monolith/docker-compose.prod.yml

184 lines
6.5 KiB
YAML

version: "2.2"
services:
app:
image: xf/monolith:latest
container_name: monolith
build: .
volumes:
- ${PORTAINER_GIT_DIR}:/code
- type: bind
source: /code/run
target: /var/run
environment:
PORTAINER_GIT_DIR: "${PORTAINER_GIT_DIR}"
MODULES_ENABLED: "${MODULES_ENABLED}"
DISCORD_TOKEN: "${DISCORD_TOKEN}"
THRESHOLD_LISTENER_HOST: "${THRESHOLD_LISTENER_HOST}"
THRESHOLD_LISTENER_PORT: "${THRESHOLD_LISTENER_PORT}"
THRESHOLD_LISTENER_SSL: "${THRESHOLD_LISTENER_SSL}"
THRESHOLD_RELAY_ENABLED: "${THRESHOLD_RELAY_ENABLED}"
THRESHOLD_RELAY_HOST: "${THRESHOLD_RELAY_HOST}"
THRESHOLD_RELAY_PORT: "${THRESHOLD_RELAY_PORT}"
THRESHOLD_RELAY_SSL: "${THRESHOLD_RELAY_SSL}"
THRESHOLD_API_ENABLED: "${THRESHOLD_API_ENABLED}"
THRESHOLD_API_HOST: "${THRESHOLD_API_HOST}"
THRESHOLD_API_PORT: "${THRESHOLD_API_PORT}"
THRESHOLD_CONFIG_DIR: "${THRESHOLD_CONFIG_DIR}"
#THRESHOLD_TEMPLATE_DIR: "${#THRESHOLD_TEMPLATE_DIR}"
THRESHOLD_CERT_DIR: "${THRESHOLD_CERT_DIR}"
# How many messages to ingest at once from Redis
MONOLITH_INGEST_CHUNK_SIZE: "${MONOLITH_INGEST_CHUNK_SIZE}"
# Time to wait between polling Redis again
MONOLITH_INGEST_ITER_DELAY: "${MONOLITH_INGEST_ITER_DELAY}"
# Number of 4chan threads to request at once
MONOLITH_CH4_THREADS_CONCURRENT: "${MONOLITH_CH4_THREADS_CONCURRENT}"
# Time to wait between every MONOLITH_CH4_THREADS_CONCURRENT threads
MONOLITH_CH4_THREADS_DELAY: "${MONOLITH_CH4_THREADS_DELAY}"
# Time to wait after finishing a crawl before starting again
MONOLITH_CH4_CRAWL_DELAY: "${MONOLITH_CH4_CRAWL_DELAY}"
# Semaphore value
MONOLITH_CH4_THREADS_SEMAPHORE: "${MONOLITH_CH4_THREADS_SEMAPHORE}"
# Threads to use for data processing
# Leave uncommented to use all available threads
MONOLITH_PROCESS_THREADS: "${MONOLITH_PROCESS_THREADS}"
# Enable performance metrics after message processing
MONOLITH_PROCESS_PERFSTATS: "${MONOLITH_PROCESS_PERFSTATS}"
MONOLITH_CH4_BOARDS: "${MONOLITH_CH4_BOARDS}"
REDIS_PASSWORD: "${REDIS_PASSWORD}"
MONOLITH_INGEST_INCREASE_BELOW: "${MONOLITH_INGEST_INCREASE_BELOW}"
MONOLITH_INGEST_INCREASE_BY: "${MONOLITH_INGEST_INCREASE_BY}"
MONOLITH_INGEST_DECREASE_ABOVE: "${MONOLITH_INGEST_DECREASE_ABOVE}"
MONOLITH_INGEST_DECREASE_BY: "${MONOLITH_INGEST_DECREASE_BY}"
MONOLITH_INGEST_MAX: "${MONOLITH_INGEST_MAX}"
MONOLITH_INGEST_MIN: "${MONOLITH_INGEST_MIN}"
deploy:
resources:
limits:
cpus: '0.5'
memory: 1.0G
network_mode: host
# threshold:
# image: xf/threshold:latest
# container_name: threshold
# build: legacy/docker
# volumes:
# - ${PORTAINER_GIT_DIR}:/code
# - ${THRESHOLD_CONFIG_DIR}:/code/legacy/conf/live
# #- ${THRESHOLD_TEMPLATE_DIR}:/code/conf/templates
# - ${THRESHOLD_CERT_DIR}:/code/legacy/conf/cert
# volumes_from:
# - tmp
# ports:
# - "${THRESHOLD_LISTENER_PORT}:${THRESHOLD_LISTENER_PORT}"
# - "${THRESHOLD_RELAY_PORT}:${THRESHOLD_RELAY_PORT}"
# - "${THRESHOLD_API_PORT}:${THRESHOLD_API_PORT}"
# environment:
# PORTAINER_GIT_DIR: "${PORTAINER_GIT_DIR}"
# MODULES_ENABLED: "${MODULES_ENABLED}"
# DISCORD_TOKEN: "${DISCORD_TOKEN}"
# THRESHOLD_LISTENER_HOST: "${THRESHOLD_LISTENER_HOST}"
# THRESHOLD_LISTENER_PORT: "${THRESHOLD_LISTENER_PORT}"
# THRESHOLD_LISTENER_SSL: "${THRESHOLD_LISTENER_SSL}"
# THRESHOLD_RELAY_ENABLED: "${THRESHOLD_RELAY_ENABLED}"
# THRESHOLD_RELAY_HOST: "${THRESHOLD_RELAY_HOST}"
# THRESHOLD_RELAY_PORT: "${THRESHOLD_RELAY_PORT}"
# THRESHOLD_RELAY_SSL: "${THRESHOLD_RELAY_SSL}"
# THRESHOLD_API_ENABLED: "${THRESHOLD_API_ENABLED}"
# THRESHOLD_API_HOST: "${THRESHOLD_API_HOST}"
# THRESHOLD_API_PORT: "${THRESHOLD_API_PORT}"
# THRESHOLD_CONFIG_DIR: "${THRESHOLD_CONFIG_DIR}"
# #THRESHOLD_TEMPLATE_DIR: "${#THRESHOLD_TEMPLATE_DIR}"
# THRESHOLD_CERT_DIR: "${THRESHOLD_CERT_DIR}"
# # How many messages to ingest at once from Redis
# MONOLITH_INGEST_CHUNK_SIZE: "${MONOLITH_INGEST_CHUNK_SIZE}"
# # Time to wait between polling Redis again
# MONOLITH_INGEST_ITER_DELAY: "${MONOLITH_INGEST_ITER_DELAY}"
# # Number of 4chan threads to request at once
# MONOLITH_CH4_THREADS_CONCURRENT: "${MONOLITH_CH4_THREADS_CONCURRENT}"
# # Time to wait between every MONOLITH_CH4_THREADS_CONCURRENT threads
# MONOLITH_CH4_THREADS_DELAY: "${MONOLITH_CH4_THREADS_DELAY}"
# # Time to wait after finishing a crawl before starting again
# MONOLITH_CH4_CRAWL_DELAY: "${MONOLITH_CH4_CRAWL_DELAY}"
# # Semaphore value
# MONOLITH_CH4_THREADS_SEMAPHORE: "${MONOLITH_CH4_THREADS_SEMAPHORE}"
# # Threads to use for data processing
# # Leave uncommented to use all available threads
# MONOLITH_PROCESS_THREADS: "${MONOLITH_PROCESS_THREADS}"
# # Enable performance metrics after message processing
# MONOLITH_PROCESS_PERFSTATS: "${MONOLITH_PROCESS_PERFSTATS}"
# MONOLITH_CH4_BOARDS: "${MONOLITH_CH4_BOARDS}"
# REDIS_PASSWORD: "${REDIS_PASSWORD}"
# # for development
# extra_hosts:
# - "host.docker.internal:host-gateway"
# networks:
# - default
# - xf
# - db
ssdb:
image: tsl0922/ssdb
container_name: ssdb_monolith
ports:
- "1289:1289"
environment:
- SSDB_PORT=1289
volumes:
- monolith_ssdb_data:/var/lib/ssdb
# networks:
# - default
# - db
deploy:
resources:
limits:
cpus: '0.5'
memory: 1.0G
network_mode: host
redis:
image: redis
container_name: redis_monolith
command: redis-server /etc/redis.conf
ulimits:
nproc: 65535
nofile:
soft: 65535
hard: 65535
volumes:
- ${PORTAINER_GIT_DIR}/docker/redis.conf:/etc/redis.conf
- monolith_redis_data:/data
- type: bind
source: /code/run
target: /var/run
# volumes_from:
# - tmp
healthcheck:
test: "redis-cli ping"
interval: 2s
timeout: 2s
retries: 15
# networks:
# - default
# - xf
# - db
deploy:
resources:
limits:
cpus: '0.5'
memory: 1.0G
network_mode: host
# networks:
# default:
# driver: bridge
# xf:
# external: true
# db:
# external: true
volumes:
monolith_redis_data:
monolith_ssdb_data: