ytdlbot/docker-compose.yml

74 lines
1.6 KiB
YAML
Raw Normal View History

2021-08-29 10:19:49 +08:00
services:
redis:
2022-10-26 20:17:33 +08:00
image: redis:7-alpine
container_name: redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- ./redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
command: redis-server --appendonly yes
2021-08-29 10:19:49 +08:00
logging:
options:
max-size: "10m"
max-file: "3"
2021-08-29 10:19:49 +08:00
2021-12-29 16:57:06 +08:00
mysql:
image: mysql:8.0-debian
container_name: mysql
restart: unless-stopped
ports:
- "3306:3306"
2021-12-29 16:57:06 +08:00
volumes:
- ./db_data:/var/lib/mysql
environment:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
MYSQL_DATABASE: "ytdlbot"
MYSQL_USER: "ytdlbot"
MYSQL_PASSWORD: "your_password"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 3
command:
- --default-authentication-plugin=mysql_native_password
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --explicit_defaults_for_timestamp=1
- --max_allowed_packet=64M
2021-12-29 16:57:06 +08:00
logging:
options:
max-size: "10m"
max-file: "3"
2021-12-29 16:57:06 +08:00
2021-08-29 10:19:49 +08:00
ytdl:
image: bennythink/ytdlbot
build: .
container_name: ytdl
2021-08-29 10:19:49 +08:00
env_file:
- .env
restart: unless-stopped
2023-12-21 03:09:34 +08:00
volumes:
- ./youtube-cookies.txt:/app/youtube-cookies.txt
depends_on:
redis:
condition: service_healthy
mysql:
condition: service_healthy
volumes:
redis_data:
name: ytdl_redis_data
mysql_data:
name: ytdl_mysql_data
networks:
default:
name: ytdl_network