diff --git a/docker-compose-prod.yml b/docker-compose-prod.yml index b404c7f..2025e0f 100644 --- a/docker-compose-prod.yml +++ b/docker-compose-prod.yml @@ -17,6 +17,9 @@ services: - 'traefik.http.routers.glass.rule=Host(`blog.justinpaulhammond.com`, `www.blog.justinpaulhammond.com`)' - 'traefik.http.routers.glass.tls=true' - 'traefik.http.routers.glass.tls.certresolver=letsencrypt' + depends_on: + glass-db: + condition: service_healthy volumes: - ./src/storage/logs:/var/www/html/storage/logs - ./src/storage/app/public:/var/www/html/public/storage @@ -24,7 +27,8 @@ services: mem_limit: '768m' healthcheck: test: ['CMD', 'mariadb', '-u${MARIADB_USER}', '-p${MARIADB_PASSWORD}', '-e', 'show databases;'] - start_period: 10s + # Need to account for upgrade times at startup + start_period: 30s start_interval: 1s interval: 30s timeout: 10s diff --git a/docker-compose.override.yml b/docker-compose.override.yml index ef7201f..7e8dfd2 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -2,5 +2,8 @@ services: glass: labels: - 'traefik.http.routers.glass.rule=Host(`glass.localhost`)' + depends_on: + glass-db: + condition: service_started volumes: - ./src:/var/www/html diff --git a/docker-compose.yml b/docker-compose.yml index c84987f..38d6afc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,8 +9,6 @@ services: - traefik.enable=true env_file: - src/.env - depends_on: - - glass-db glass-db: image: 'mariadb:11.1.3' restart: always