Files
wace_rps/docker/deploy/docker-compose.yml
T
hjjeong 902118d46e PR-C G6 견적관리 SMTP 메일 발송 (wace sendEstimateMailCustom 1:1)
- nodemailer + pdf-lib로 실제 SMTP 발송. mail_log INSERT(is_send='N') → 발송 → 성공 시 UPDATE(is_send='Y'), 실패 시 UPDATE(error_log). SMTP_SEND_SWITCH='N'면 발송 스킵.
- SMTP 3계정(ERP/SALES/PURCHASE) host/user/pw 환경변수 분리. 견적서는 SALES. dev는 backend-node/.env, 운영은 deploy/onpremise + docker/prod + docker/deploy 3개 compose에 environment 매핑(호스트 .env에서 실값 주입).
- 다이얼로그(EstimateMailDialog): wace estimateMailFormPopup.jsp 1:1. 고객사 담당자 체크박스 + To/CC/제목/내용 자동채움(GET /sales/estimate/mail-info/:id + .../customer/:id/managers). hasBaseEst/hasAddEst 분기로 PDF 첨부 안내. 본문은 다이얼로그 plain text 입력 → <br> 변환.
- PDF 첨부: 메일 다이얼로그가 hidden iframe으로 최신 차수 template1/2 페이지를 렌더 → window.fn_generateAndUploadPdf(cb) 글로벌 → jsPDF.output('datauristring') base64 추출 → 한 요청에 전달. backend가 견적 PDF + estimate02 N건 pdf-lib로 합본 첨부.
- PDF 캡처 수신처 누락 픽스: CustomerSelect의 /sales/customers 옵션 fetch가 iframe에서 dataLoaded=true 뒤에 끝나 셀렉트 라벨이 빈 상태로 캡처되던 현상. fetchCustomers export + template1/2 setLoading(false) 직전 await + onclone에서 [role="combobox"] 라이브 DOM 텍스트 fallback.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 16:09:10 +09:00

88 lines
2.8 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:-}
# SMTP (견적서/발주서 등 메일 발송)
SMTP_HOST: ${SMTP_HOST:-erp.rps-korea.com}
SMTP_PORT: ${SMTP_PORT:-25}
SMTP_TLS: ${SMTP_TLS:-false}
SMTP_SEND_SWITCH: ${SMTP_SEND_SWITCH:-Y}
SMTP_USER_ERP: ${SMTP_USER_ERP:-}
SMTP_PW_ERP: ${SMTP_PW_ERP:-}
SMTP_USER_SALES: ${SMTP_USER_SALES:-}
SMTP_PW_SALES: ${SMTP_PW_SALES:-}
SMTP_USER_PURCHASE: ${SMTP_USER_PURCHASE:-}
SMTP_PW_PURCHASE: ${SMTP_PW_PURCHASE:-}
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