Merge pull request #1437 from MaxJa4/improvement/wait_for_db
[Docker] Web_recipes waits for db_recipes to be ready
This commit is contained in:
commit
ed852b3246
@ -9,6 +9,11 @@ services:
|
||||
- ./.env
|
||||
networks:
|
||||
- default
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "psql -U $$POSTGRES_USER -d $$POSTGRES_DB --list || exit 1"]
|
||||
interval: 4s
|
||||
timeout: 1s
|
||||
retries: 12
|
||||
|
||||
web_recipes:
|
||||
image: vabene1111/recipes
|
||||
@ -20,7 +25,8 @@ services:
|
||||
- nginx_config:/opt/recipes/nginx/conf.d
|
||||
- ./mediafiles:/opt/recipes/mediafiles
|
||||
depends_on:
|
||||
- db_recipes
|
||||
db_recipes:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- default
|
||||
|
||||
|
@ -7,6 +7,11 @@ services:
|
||||
- ./postgresql:/var/lib/postgresql/data
|
||||
env_file:
|
||||
- ./.env
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "psql -U $$POSTGRES_USER -d $$POSTGRES_DB --list || exit 1"]
|
||||
interval: 4s
|
||||
timeout: 1s
|
||||
retries: 12
|
||||
|
||||
web_recipes:
|
||||
image: vabene1111/recipes
|
||||
@ -18,7 +23,8 @@ services:
|
||||
- nginx_config:/opt/recipes/nginx/conf.d
|
||||
- ./mediafiles:/opt/recipes/mediafiles
|
||||
depends_on:
|
||||
- db_recipes
|
||||
db_recipes:
|
||||
condition: service_healthy
|
||||
|
||||
nginx_recipes:
|
||||
image: nginx:mainline-alpine
|
||||
@ -36,4 +42,4 @@ services:
|
||||
|
||||
volumes:
|
||||
nginx_config:
|
||||
staticfiles:
|
||||
staticfiles:
|
||||
|
@ -9,6 +9,11 @@ services:
|
||||
- ./.env
|
||||
networks:
|
||||
- default
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "psql -U $$POSTGRES_USER -d $$POSTGRES_DB --list || exit 1"]
|
||||
interval: 4s
|
||||
timeout: 1s
|
||||
retries: 12
|
||||
|
||||
web_recipes:
|
||||
image: vabene1111/recipes
|
||||
@ -20,7 +25,8 @@ services:
|
||||
- nginx_config:/opt/recipes/nginx/conf.d
|
||||
- ./mediafiles:/opt/recipes/mediafiles
|
||||
depends_on:
|
||||
- db_recipes
|
||||
db_recipes:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- default
|
||||
|
||||
@ -51,4 +57,4 @@ networks:
|
||||
|
||||
volumes:
|
||||
nginx_config:
|
||||
staticfiles:
|
||||
staticfiles:
|
||||
|
Loading…
Reference in New Issue
Block a user