29 lines
1006 B
Docker
29 lines
1006 B
Docker
FROM node:22-bookworm-slim AS build
|
|
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm ci --no-audit --no-fund
|
|
COPY tsconfig.json ./
|
|
COPY control-plane ./control-plane
|
|
COPY LianSyn-platform ./LianSyn-platform
|
|
RUN npm run build
|
|
|
|
FROM node:22-bookworm-slim AS runtime
|
|
|
|
ENV NODE_ENV=production
|
|
WORKDIR /app
|
|
RUN apt-get update \
|
|
&& apt-get install --no-install-recommends -y libreoffice-calc libreoffice-writer fonts-noto-cjk \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
COPY package*.json ./
|
|
RUN npm ci --omit=dev --no-audit --no-fund
|
|
COPY --from=build /app/.build ./.build
|
|
COPY --from=build /app/control-plane/migrations ./.build/control-plane/migrations
|
|
COPY --from=build /app/LianSyn-platform ./LianSyn-platform
|
|
# Shared parsed original-date validation is also consumed by the browser plugin.
|
|
COPY chrome-extension/ltjt-order-assistant/operation-plans.js chrome-extension/ltjt-order-assistant/package.json ./chrome-extension/ltjt-order-assistant/
|
|
|
|
USER node
|
|
EXPOSE 8786
|
|
CMD ["node", ".build/control-plane/src/server.js"]
|