Files
Touchh/docker-compose.yaml
2024-12-29 21:55:41 +10:00

37 lines
1.0 KiB
YAML

services:
db:
image: mariadb:11.6
restart: on-failure
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=1
- MYSQL_DATABASE=touchh
- MYSQL_USER=touchh
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-touchh}
healthcheck:
test: mariadb -utouchh -p${MYSQL_PASSWORD:-touchh} -e 'SELECT 1;' touchh
interval: 1s
timeout: 10s
retries: 10
volumes:
- ./var/mysql:/var/lib/mysql
bot:
&py_service
build: .
image: touchh-py
restart: on-failure
command: ['python3', 'manage.py', 'run_bot']
depends_on:
db:
condition: service_healthy
stop_signal: SIGINT
volumes:
- .:/app
scheduler:
<<: *py_service
command: ['python3', 'manage.py', 'start_scheduler']
web:
<<: *py_service
command: ['python3', 'manage.py', 'runserver', '0.0.0.0:8000']
ports:
- "${DOCKER_HTTP_BIND:-8000}:8000"