Cloudlog/docker-compose.yml
Peter Goodhall bd1a92d660 Improve service startup reliability and DB readiness checks
Adds healthcheck to the database service in docker-compose and ensures the web service waits for the database to be healthy before starting. Updates script.sh to wait for the database to be ready before proceeding. Enhances the Cypress workflow to retry DXCC population for improved test reliability.
2025-07-17 17:13:12 +01:00

40 行
628 B
YAML

version: "3.8"
networks:
mynet:
services:
web:
build: .
env_file:
- .env
ports:
- "80:80"
volumes:
- ./:/var/www/html:rw
command: ["./script.sh"]
depends_on:
db:
condition: service_healthy
networks:
- mynet
db:
build:
context: .
dockerfile: Dockerfile-db
env_file:
- .env
volumes:
- db_data:/var/lib/mysql
networks:
- mynet
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 20s
retries: 10
interval: 10s
start_period: 30s
volumes:
db_data: {}