mirror of
https://github.com/xCyanGrizzly/DragonsStash.git
synced 2026-05-10 22:01:16 +00:00
Remove profiles from worker service in both docker-compose.yml and docker-compose.dev.yml so the worker starts automatically with `docker compose up`. This fixes the issue where verification SMS and the scheduler timer were not working because the worker was never started. The bot remains as an optional profile. Update README to reflect the change. Co-authored-by: xCyanGrizzly <53275238+xCyanGrizzly@users.noreply.github.com>
59 lines
1.5 KiB
YAML
59 lines
1.5 KiB
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
ports:
|
|
- "5432:5432"
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:-dragons}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-stash}
|
|
POSTGRES_DB: ${POSTGRES_DB:-dragonsstash}
|
|
volumes:
|
|
- postgres_dev_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-dragons} -d ${POSTGRES_DB:-dragonsstash}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
worker:
|
|
build:
|
|
context: .
|
|
dockerfile: worker/Dockerfile
|
|
env_file:
|
|
- .env.local
|
|
environment:
|
|
- DATABASE_URL=postgresql://${POSTGRES_USER:-dragons}:${POSTGRES_PASSWORD:-stash}@db:5432/${POSTGRES_DB:-dragonsstash}
|
|
- WORKER_INTERVAL_MINUTES=5
|
|
- WORKER_TEMP_DIR=/tmp/zips
|
|
- TDLIB_STATE_DIR=/data/tdlib
|
|
- WORKER_MAX_ZIP_SIZE_MB=4096
|
|
- LOG_LEVEL=debug
|
|
volumes:
|
|
- tdlib_dev_state:/data/tdlib
|
|
- tmp_dev_zips:/tmp/zips
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
|
|
bot:
|
|
profiles: ["bot", "full"]
|
|
build:
|
|
context: .
|
|
dockerfile: bot/Dockerfile
|
|
env_file:
|
|
- .env.local
|
|
environment:
|
|
- DATABASE_URL=postgresql://${POSTGRES_USER:-dragons}:${POSTGRES_PASSWORD:-stash}@db:5432/${POSTGRES_DB:-dragonsstash}
|
|
- LOG_LEVEL=debug
|
|
volumes:
|
|
- tdlib_dev_bot_state:/data/tdlib
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
postgres_dev_data:
|
|
tdlib_dev_state:
|
|
tdlib_dev_bot_state:
|
|
tmp_dev_zips:
|