| 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: |