report-generator-backend/Dockerfile
jorming.chong 148182c680
Some checks are pending
Test / test (push) Waiting to run
first commit
2026-01-07 09:29:07 +08:00

25 lines
724 B
Docker

FROM node:22-alpine AS build
WORKDIR /app
COPY .yarnrc.yml package.json yarn.lock ./
COPY .yarn/releases ./.yarn/releases
RUN --mount=type=secret,id=JIG_SOFTWARE_GITEA_DEPLOYMENT_TOKEN,env=JIG_SOFTWARE_GITEA_DEPLOYMENT_TOKEN yarn
COPY tsconfig.json tsconfig.build.json ./
COPY src ./src
RUN yarn build
RUN yarn workspaces focus --all --production
FROM node:22-alpine
ENV NODE_ENV=production
WORKDIR /app
COPY .yarnrc.yml package.json yarn.lock ./
COPY --from=build /app/dist ./dist
COPY --from=build /app/.yarn ./.yarn
COPY --from=build /app/.pnp.* ./
CMD ["yarn", "start"]
# Uncomment if healthcheck is needed
# HEALTHCHECK --interval=1m --timeout=10s --start-period=10s --retries=3 \
# CMD [ "yarn", "health-check"]