도커 재수정

This commit is contained in:
dohyeons
2025-10-02 16:14:22 +09:00
parent c4b92f0710
commit f54f6336a5
5 changed files with 67 additions and 45 deletions

View File

@@ -1,29 +1,37 @@
services:
# Node.js 백엔드 (운영용)
backend:
# Node.js 백엔드
plm-backend:
build:
context: ../../backend-node
dockerfile: ../docker/prod/backend.Dockerfile # 운영용 Dockerfile
container_name: pms-backend-prod
network_mode: "host" # 호스트 네트워크 모드
dockerfile: ../docker/prod/backend.Dockerfile
container_name: plm-backend
restart: always
environment:
- NODE_ENV=production
- PORT=8080
- HOST=0.0.0.0 # 모든 인터페이스에서 바인딩
- DATABASE_URL=postgresql://postgres:ph0909!!@39.117.244.52:11132/plm
- JWT_SECRET=ilshin-plm-super-secret-jwt-key-2024
- JWT_EXPIRES_IN=24h
- CORS_ORIGIN=http://192.168.0.70:5555,http://39.117.244.52:5555,http://localhost:9771
- CORS_CREDENTIALS=true
- LOG_LEVEL=info
restart: unless-stopped
NODE_ENV: production
PORT: "3001"
DATABASE_URL: postgresql://postgres:ph0909!!@39.117.244.52:11132/plm
JWT_SECRET: ilshin-plm-super-secret-jwt-key-2024
JWT_EXPIRES_IN: 24h
CORS_ORIGIN: https://v1.vexplor.com
CORS_CREDENTIALS: "true"
LOG_LEVEL: info
volumes:
- /home/vexplor/backend_data:/app/uploads
labels:
- traefik.enable=true
- traefik.http.routers.backend.rule=Host(`api.vexplor.com`)
- traefik.http.routers.backend.entrypoints=websecure,web
- traefik.http.routers.backend.tls=true
- traefik.http.routers.backend.tls.certresolver=le
- traefik.http.services.backend.loadbalancer.server.port=3001
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
test: ["CMD", "curl", "-f", "http://localhost:3001/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
networks:
pms-network:
driver: bridge
default:
name: toktork_server_default
external: true