# docker-compose.base.yml # 기본 서비스 정의 (공통 설정) version: "3.8" services: fems-admin: build: context: ./fems-admin target: ${NODE_ENV:-development} restart: unless-stopped env_file: - .env.${NODE_ENV:-development} volumes: - ./fems-admin:/app - /app/node_modules environment: - NODE_ENV=${NODE_ENV:-development} logging: driver: "json-file" options: max-size: "10m" max-file: "3" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3000/health"] interval: 30s timeout: 10s retries: 3 depends_on: - fems-api fems-app: build: context: ./fems-app target: ${NODE_ENV:-development} restart: unless-stopped env_file: - .env.${NODE_ENV:-development} volumes: - ./fems-app:/app - /app/node_modules environment: - NODE_ENV=${NODE_ENV:-development} depends_on: - fems-api fems-api: build: context: ./fems-api target: ${NODE_ENV:-development} restart: unless-stopped env_file: - .env.${NODE_ENV:-development} volumes: - ./fems-api:/app - /app/node_modules environment: - NODE_ENV=${NODE_ENV:-development} # - POSTGRES_DB=${POSTGRES_DB} # - POSTGRES_USER=${POSTGRES_USER} # - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} # - POSTGRES_HOST=${POSTGRES_HOST} depends_on: - postgres - redis postgres: image: postgres:16-alpine restart: unless-stopped env_file: - .env.${NODE_ENV:-development} environment: - NODE_ENV=${NODE_ENV:-development} volumes: - postgres_data:/var/lib/postgresql/data - ./backups/postgres:/backups # healthcheck: # test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] # interval: 30s # timeout: 10s # retries: 3 redis: image: redis:alpine restart: unless-stopped env_file: - .env.${NODE_ENV:-development} command: [ "redis-server", "--requirepass", "${NODE_ENV:-development:-REDIS_PASSWORD}", ] volumes: - redis_data:/data - ./backups/redis:/backups environment: - NODE_ENV=${NODE_ENV:-development} - REDIS_PASSWORD=${NODE_ENV:-development:-REDIS_PASSWORD} # healthcheck: # test: ["CMD", "redis-cli", "ping"] # interval: 30s # timeout: 10s # retries: 3 volumes: postgres_data: redis_data: