external postgres net
This commit is contained in:
@ -9,11 +9,13 @@ services:
|
|||||||
env_file:
|
env_file:
|
||||||
- path: ./env/backend/prod.env
|
- path: ./env/backend/prod.env
|
||||||
required: true
|
required: true
|
||||||
volumes:
|
networks:
|
||||||
- ./backend/app:/code/app:z
|
db:
|
||||||
depends_on:
|
name: db-net
|
||||||
postgres:
|
external: true
|
||||||
condition: service_healthy
|
# depends_on:
|
||||||
|
# postgres:
|
||||||
|
# condition: service_healthy
|
||||||
nginx:
|
nginx:
|
||||||
build:
|
build:
|
||||||
dockerfile: ./nginx/Dockerfile
|
dockerfile: ./nginx/Dockerfile
|
||||||
@ -24,19 +26,19 @@ services:
|
|||||||
- backend
|
- backend
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
postgres:
|
# postgres:
|
||||||
image: postgres:16.2-alpine
|
# image: postgres:16.2-alpine
|
||||||
restart: unless-stopped
|
# restart: unless-stopped
|
||||||
ports:
|
# ports:
|
||||||
- "5432:5432"
|
# - "5432:5432"
|
||||||
volumes:
|
# volumes:
|
||||||
- ./postgres_data:/var/lib/postgresql/data/
|
# - ./postgres_data:/var/lib/postgresql/data/
|
||||||
env_file:
|
# env_file:
|
||||||
- path: ./env/postgres.env
|
# - path: ./env/postgres.env
|
||||||
required: true
|
# required: true
|
||||||
healthcheck:
|
# healthcheck:
|
||||||
test:
|
# test:
|
||||||
["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} --user $${POSTGRES_USER}"]
|
# ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} --user $${POSTGRES_USER}"]
|
||||||
interval: 2s
|
# interval: 2s
|
||||||
timeout: 2s
|
# timeout: 2s
|
||||||
retries: 5
|
# retries: 5
|
||||||
|
|||||||
Reference in New Issue
Block a user