fix: django starting b4 db was ready

This commit is contained in:
AdrienLSH 2023-11-25 00:26:54 +01:00
parent f29003c66a
commit 51ab9b65a6

View File

@ -12,7 +12,9 @@ services:
restart: always restart: always
env_file: .env env_file: .env
depends_on: depends_on:
- db db:
condition: service_healthy
restart: true
db: db:
image: postgres image: postgres
@ -23,6 +25,11 @@ services:
container_name: db container_name: db
restart: always restart: always
env_file: .env env_file: .env
healthcheck:
test: "pg_isready -U $POSTGRES_USER"
interval: 5s
timeout: 5s
retries: 5
volumes: volumes:
db: db: