2023-02-18 19:01:13 +03:00
|
|
|
version: "3"
|
|
|
|
|
|
|
|
services:
|
2023-03-03 17:10:17 +03:00
|
|
|
|
2023-02-18 19:01:13 +03:00
|
|
|
${REPO_NAME_SNAKE}:
|
2023-03-03 13:23:46 +03:00
|
|
|
image: ${REPO_OWNER_LOWER}/${REPO_NAME_SNAKE}:latest
|
2023-02-18 19:01:13 +03:00
|
|
|
container_name: ${REPO_NAME_SNAKE}
|
|
|
|
restart: unless-stopped
|
|
|
|
ports:
|
|
|
|
- "8080:8000"
|
|
|
|
links:
|
|
|
|
- ${REPO_NAME_SNAKE}_db
|
|
|
|
env_file: .env
|
2023-03-03 17:10:17 +03:00
|
|
|
depends_on:
|
|
|
|
${REPO_NAME_SNAKE}_db:
|
|
|
|
condition: service_healthy
|
|
|
|
|
2023-02-18 19:01:13 +03:00
|
|
|
${REPO_NAME_SNAKE}_db:
|
|
|
|
image: mariadb:latest
|
|
|
|
container_name: ${REPO_NAME_SNAKE}_db
|
|
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
|
|
- "./database:/var/lib/mysql"
|
2023-03-03 17:10:17 +03:00
|
|
|
env_file: .env_db
|
|
|
|
healthcheck:
|
|
|
|
test: sh -c "mysqladmin ping -u$$$$MYSQL_USER -p$$$$MYSQL_PASSWORD"
|
|
|
|
interval: 1s
|
|
|
|
timeout: 3s
|
|
|
|
retries: 20
|
|
|
|
start_period: 10s
|