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