Files
template/docker-compose.prod.yml
neckfire 8debdd49b5
Some checks failed
Deploy / deploy (push) Failing after 12s
Actualiser docker-compose.prod.yml
2026-03-10 12:40:36 +00:00

51 lines
1.1 KiB
YAML

version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: ${APP_NAME}-prod
restart: unless-stopped
env_file:
- .env
ports:
- "${PROD_PORT}:8080"
networks:
- web
depends_on:
mysql:
condition: service_healthy
labels:
- homepage.group=${HOMEPAGE_GROUP}
- homepage.name=${HOMEPAGE_NAME}
- homepage.icon=${HOMEPAGE_ICON}
- homepage.description=${HOMEPAGE_DESC}
- homepage.href=${HOMEPAGE_HREF}
mysql:
image: mysql:8.0
container_name: ${APP_NAME}-db
restart: unless-stopped
env_file:
- .env
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_USER: ${DB_USERNAME}
volumes:
- db-data:/var/lib/mysql
networks:
- web
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u${DB_USERNAME}", "-p${DB_PASSWORD}"]
timeout: 20s
retries: 10
networks:
web:
driver: bridge
volumes:
db-data: