105 lines
2.3 KiB
YAML
105 lines
2.3 KiB
YAML
|
# docker-compose.app.yml
|
||
|
# 기본 서비스 정의 (공통 설정)
|
||
|
version: "3.8"
|
||
|
|
||
|
services:
|
||
|
fems-admin:
|
||
|
build:
|
||
|
context: ./fems-admin
|
||
|
dockerfile: Dockerfile
|
||
|
target: production
|
||
|
container_name: fems-admin
|
||
|
restart: unless-stopped
|
||
|
env_file:
|
||
|
- .env.${NODE_ENV:-development}
|
||
|
ports:
|
||
|
- "${ADMIN_PORT}:3002"
|
||
|
environment:
|
||
|
- NODE_ENV=${NODE_ENV:-development}
|
||
|
volumes:
|
||
|
- ./fems-admin:/app
|
||
|
- /app/node_modules
|
||
|
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
|
||
|
dockerfile: Dockerfile
|
||
|
target: production
|
||
|
container_name: fems-app
|
||
|
restart: unless-stopped
|
||
|
env_file:
|
||
|
- .env.${NODE_ENV:-development}
|
||
|
ports:
|
||
|
- "${APP_PORT}:3003"
|
||
|
environment:
|
||
|
- NODE_ENV=${NODE_ENV:-development}
|
||
|
volumes:
|
||
|
- ./fems-app:/app
|
||
|
- /app/node_modules
|
||
|
depends_on:
|
||
|
- fems-api
|
||
|
|
||
|
fems-api:
|
||
|
build:
|
||
|
context: ./fems-api
|
||
|
dockerfile: Dockerfile
|
||
|
target: production
|
||
|
container_name: fems-api
|
||
|
restart: unless-stopped
|
||
|
env_file:
|
||
|
- .env.${NODE_ENV:-development}
|
||
|
ports:
|
||
|
- "${API_PORT}:3001"
|
||
|
environment:
|
||
|
- NODE_ENV=${NODE_ENV:-development}
|
||
|
volumes:
|
||
|
- ./fems-api:/app
|
||
|
- /app/node_modules
|
||
|
healthcheck:
|
||
|
test: ["CMD", "curl", "-f", "http://localhost:3001/health"]
|
||
|
interval: 30s
|
||
|
timeout: 10s
|
||
|
retries: 3
|
||
|
|
||
|
fems-realtime-api:
|
||
|
build:
|
||
|
context: ./fems-realtime-api
|
||
|
dockerfile: Dockerfile
|
||
|
target: production
|
||
|
container_name: fems-realtime-api
|
||
|
restart: unless-stopped
|
||
|
env_file:
|
||
|
- .env.${NODE_ENV:-development}
|
||
|
ports:
|
||
|
- "${REALTIME_API_PORT}:3004"
|
||
|
environment:
|
||
|
- NODE_ENV=${NODE_ENV:-development}
|
||
|
volumes:
|
||
|
- ./fems-realtime-api:/app
|
||
|
- /app/node_modules
|
||
|
depends_on:
|
||
|
- fems-api
|
||
|
healthcheck:
|
||
|
test: ["CMD", "curl", "-f", "http://localhost:3004/health"]
|
||
|
interval: 30s
|
||
|
timeout: 10s
|
||
|
retries: 3
|
||
|
|
||
|
networks:
|
||
|
default:
|
||
|
driver: bridge
|
||
|
internal:
|
||
|
driver: bridge
|