diff --git a/docker-compose.yaml b/docker-compose.yaml index 7a1685b..338d823 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -11,6 +11,9 @@ services: service: db-init db: + depends_on: + db-init: + condition: service_completed_successfully extends: file: ./docker-compose/services/db.yml service: db @@ -59,7 +62,8 @@ services: stats-db: depends_on: - - backend + stats-db-init: + condition: service_completed_successfully extends: file: ./docker-compose/services/stats.yml service: stats-db @@ -67,6 +71,7 @@ services: stats: depends_on: - stats-db + - backend extends: file: ./docker-compose/services/stats.yml service: stats diff --git a/docker-compose/services/db.yml b/docker-compose/services/db.yml index d5c1d85..2ac1128 100644 --- a/docker-compose/services/db.yml +++ b/docker-compose/services/db.yml @@ -12,9 +12,6 @@ services: chown -R 2000:2000 /var/lib/postgresql/data db: - depends_on: - db-init: - condition: service_completed_successfully image: postgres:14 user: 2000:2000 restart: always diff --git a/docker-compose/services/stats.yml b/docker-compose/services/stats.yml index 07deb29..fe10291 100644 --- a/docker-compose/services/stats.yml +++ b/docker-compose/services/stats.yml @@ -12,9 +12,6 @@ services: chown -R 2000:2000 /var/lib/postgresql/data stats-db: - depends_on: - stats-db-init: - condition: service_completed_successfully image: postgres:14 user: 2000:2000 restart: always @@ -42,8 +39,6 @@ services: platform: linux/amd64 restart: always container_name: 'stats' - depends_on: - - "stats-db" extra_hosts: - 'host.docker.internal:host-gateway' env_file: