Wait while db container is started
This commit is contained in:
@@ -7,6 +7,11 @@ services:
|
||||
- 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:
|
||||
@@ -15,7 +20,9 @@ services:
|
||||
image: touchh-py
|
||||
restart: on-failure
|
||||
command: ['python3', 'manage.py', 'run_bot']
|
||||
depends_on: ['db']
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
stop_signal: SIGINT
|
||||
volumes:
|
||||
- .:/app
|
||||
|
||||
Reference in New Issue
Block a user