Files
vexplor_dev/docker/deploy/docker-compose.yml
kjs 2fc149c84b chore: Update Docker configuration for frontend deployment
- Added SERVER_API_URL argument to the Dockerfile for backend API integration.
- Updated docker-compose.yml to include SERVER_API_URL for the frontend service.

These changes aim to ensure proper communication between the frontend and backend services during deployment.
2026-04-11 22:21:11 +09:00

77 lines
2.3 KiB
YAML

version: "3.8"
services:
# Node.js 백엔드
backend:
build:
context: ../../backend-node
dockerfile: ../docker/deploy/backend.Dockerfile
container_name: pms-backend-prod
restart: always
environment:
NODE_ENV: production
PORT: "3001"
HOST: 0.0.0.0
DATABASE_URL: ${DATABASE_URL}
JWT_SECRET: ${JWT_SECRET}
JWT_EXPIRES_IN: ${JWT_EXPIRES_IN:-24h}
CORS_ORIGIN: ${CORS_ORIGIN:-https://v1.vexplor.com,https://api.vexplor.com}
CORS_CREDENTIALS: "true"
LOG_LEVEL: info
ENCRYPTION_KEY: ${ENCRYPTION_KEY}
KMA_API_KEY: ${KMA_API_KEY}
ITS_API_KEY: ${ITS_API_KEY}
EXPRESSWAY_API_KEY: ${EXPRESSWAY_API_KEY:-}
SMART_FACTORY_API_KEY_COMPANY_10: ${SMART_FACTORY_API_KEY_COMPANY_10:-}
SMART_FACTORY_API_KEY_COMPANY_9: ${SMART_FACTORY_API_KEY_COMPANY_9:-}
volumes:
- backend_uploads:/app/uploads
- backend_data:/app/data
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
# Next.js 프론트엔드
frontend:
build:
context: ../../frontend
dockerfile: ../docker/deploy/frontend.Dockerfile
args:
- NEXT_PUBLIC_API_URL=https://api.vexplor.com/api
- SERVER_API_URL=http://backend:3001
container_name: pms-frontend-prod
restart: always
environment:
NODE_ENV: production
NEXT_PUBLIC_API_URL: https://api.vexplor.com/api
SERVER_API_URL: "http://backend:3001"
NEXT_TELEMETRY_DISABLED: "1"
PORT: "3000"
HOSTNAME: 0.0.0.0
volumes:
- frontend_data:/app/data
labels:
- traefik.enable=true
- traefik.http.routers.frontend.rule=Host(`v1.vexplor.com`)
- traefik.http.routers.frontend.entrypoints=websecure,web
- traefik.http.routers.frontend.tls=true
- traefik.http.routers.frontend.tls.certresolver=le
- traefik.http.services.frontend.loadbalancer.server.port=3000
volumes:
backend_uploads:
driver: local
backend_data:
driver: local
frontend_data:
driver: local
networks:
default:
name: toktork_server_default
external: true