mirror of
https://github.com/tropicoo/yt-dlp-bot.git
synced 2025-03-01 01:03:07 +08:00
90 lines
1.9 KiB
YAML
90 lines
1.9 KiB
YAML
services:
|
|
base-image:
|
|
image: yt-base-image
|
|
build:
|
|
dockerfile: base.Dockerfile
|
|
deploy:
|
|
mode: replicated
|
|
replicas: 0
|
|
yt_api:
|
|
container_name: yt_api
|
|
build:
|
|
context: .
|
|
dockerfile: app_api/Dockerfile
|
|
env_file:
|
|
- envs/common.env
|
|
- envs/api.env
|
|
restart: unless-stopped
|
|
ports:
|
|
- "1984:8000"
|
|
command: bash -c "python start.py && python main.py"
|
|
depends_on:
|
|
- yt_postgres
|
|
- yt_rabbitmq
|
|
- yt_worker
|
|
- yt_redis
|
|
yt_bot:
|
|
container_name: yt_bot
|
|
build:
|
|
context: .
|
|
dockerfile: app_bot/Dockerfile
|
|
env_file:
|
|
- envs/common.env
|
|
- envs/bot.env
|
|
restart: unless-stopped
|
|
command: >
|
|
bash -c "python start.py && python main.py"
|
|
depends_on:
|
|
- yt_postgres
|
|
- yt_rabbitmq
|
|
- yt_worker
|
|
- yt_api
|
|
volumes:
|
|
- "shared-tmpfs:/tmp/download_tmpfs"
|
|
yt_worker:
|
|
container_name: yt_worker
|
|
build:
|
|
context: .
|
|
dockerfile: app_worker/Dockerfile
|
|
env_file:
|
|
- envs/common.env
|
|
- envs/worker.env
|
|
restart: unless-stopped
|
|
command: >
|
|
bash -c "python start.py && alembic upgrade head && python main.py"
|
|
depends_on:
|
|
- yt_postgres
|
|
- yt_rabbitmq
|
|
volumes:
|
|
- "/data/downloads:/filestorage"
|
|
- "shared-tmpfs:/tmp/download_tmpfs"
|
|
yt_postgres:
|
|
container_name: yt_postgres
|
|
image: "postgres:15"
|
|
env_file:
|
|
- envs/common.env
|
|
ports:
|
|
- "5435:5432"
|
|
restart: unless-stopped
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
yt_rabbitmq:
|
|
image: "rabbitmq:3.12-management-alpine"
|
|
container_name: yt_rabbitmq
|
|
ports:
|
|
- "25672:5672"
|
|
- "15672:15672"
|
|
restart: unless-stopped
|
|
yt_redis:
|
|
image: "redis:alpine"
|
|
container_name: yt_redis
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
pgdata:
|
|
shared-tmpfs:
|
|
driver: local
|
|
driver_opts:
|
|
type: "tmpfs"
|
|
device: "tmpfs"
|
|
o: "size=27168m,uid=1000"
|