File size: 912 Bytes
02fd3ca | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | version: '3.8'
services:
db:
image: postgres:16-alpine
container_name: sd_postgres
restart: unless-stopped
ports:
- "${DB_PORT:-5432}:5432"
environment:
POSTGRES_USER: hjun
POSTGRES_PASSWORD: alsdfjwpoejfkd
POSTGRES_DB: sd_roster_real
volumes:
- db_data:/var/lib/postgresql/data
- ./docker/init:/docker-entrypoint-initdb.d:ro # 초기 스키마/권한 스크립트
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 3s
retries: 20
pgadmin:
image: dpage/pgadmin4
container_name: sd_pgadmin
restart: unless-stopped
environment:
PGADMIN_DEFAULT_EMAIL: hjun@unicef.org
PGADMIN_DEFAULT_PASSWORD: alsdfjwpoejfkd
ports:
- "${PGADMIN_PORT:-5050}:80"
depends_on:
db:
condition: service_healthy
volumes:
db_data: |