4c1dc4082e
Build and Push Images / build-and-push (push) Has been cancelled
이전 세션들에서 작업된 아래 범위를 모두 포함: Fleet 서브시스템 (src/fleet/) - fleetDeviceService / fleetCommandService / fleetDeploymentService / fleetReleaseService - fleetMetricsService, fleetScriptService, fleetEdgeConfigService - Edge 디바이스 관리, 커맨드 발행, 배포/릴리스, 스크립트 동기화 Collector 확장 - centralMqttForwarder / centralForwarderConfigService - equipmentStateService, pythonHookRunner, scriptCache - Modbus/OPC-UA/S7/XGT 프로토콜 클라이언트 - targetDbIntrospection (저장 DB 조회) Routes / API - automationDashboardRoutes, centralForwarderRoutes, equipmentStateRoutes DB - importEdgeConfig (Python cached config → Pipeline DB) - seedDataSources (external_db_connections 초기 시드) 엣지 배포 리소스 - docker/edge/Dockerfile.backend.prod, Dockerfile.frontend.prod - docker/edge/docker-compose.edge.yml 프론트엔드 - admin/automaticMng (centralForwarder, dashboard, equipmentState) - admin/fleet (commands, devices, deployments, releases, scripts, alerts) - admin/pipeline-device 개선 (저장 DB 드롭다운, 태그 매핑 등) - ExternalDbConnectionModal, ScriptsManagerDialog 등 신규 컴포넌트 - lib/api: automationDashboard, centralForwarder, equipmentState, fleet docs/ - EDGE_SERVER_STRUCTURE, FLEET_COMPLETE, FLEET_EDGE_INTEGRATION, FLEET_HOOK_INTEGRATION Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
59 lines
1.5 KiB
Docker
59 lines
1.5 KiB
Docker
# ============================================================
|
|
# Pipeline Backend — 엣지 배포용 프로덕션 이미지
|
|
#
|
|
# Python 훅 실행기용 python3 포함.
|
|
# ts-node 대신 dist/app.js 실행 (프로덕션).
|
|
# ============================================================
|
|
|
|
FROM node:20-bookworm-slim AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# 시스템 패키지
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends openssl ca-certificates curl python3 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# 의존성 설치 (devDependencies 포함 — tsc 빌드 필요)
|
|
COPY package*.json ./
|
|
RUN npm ci --prefer-offline --no-audit
|
|
|
|
# 소스 복사 + 빌드
|
|
COPY tsconfig.json ./
|
|
COPY src ./src
|
|
COPY db ./db
|
|
RUN npx tsc --outDir dist
|
|
|
|
# ── Runtime 스테이지 (작은 이미지) ──────────────────
|
|
FROM node:20-bookworm-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Python3 + 필수 런타임만
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends openssl ca-certificates curl python3 \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& apt-get clean
|
|
|
|
# Production 의존성만
|
|
COPY package*.json ./
|
|
RUN npm ci --omit=dev --prefer-offline --no-audit \
|
|
&& npm cache clean --force
|
|
|
|
# 빌드 결과물 복사
|
|
COPY --from=builder /app/dist ./dist
|
|
COPY --from=builder /app/db ./db
|
|
|
|
# 스토리지 폴더
|
|
RUN mkdir -p /app/storage /app/uploads \
|
|
&& chown -R node:node /app
|
|
|
|
USER node
|
|
|
|
EXPOSE 8080 1883 8083
|
|
|
|
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
|
|
CMD curl -fsS http://localhost:8080/health || exit 1
|
|
|
|
CMD ["node", "dist/app.js"]
|