33 lines
711 B
Docker
33 lines
711 B
Docker
FROM node:24-trixie-slim AS build
|
|
|
|
WORKDIR /app
|
|
|
|
COPY app-new/backend/package*.json backend/
|
|
COPY app-new/frontend/package*.json frontend/
|
|
RUN cd backend && npm ci
|
|
RUN cd frontend && npm ci
|
|
|
|
COPY app-new .
|
|
|
|
RUN cd backend && npm run build
|
|
RUN cd frontend && npm run build
|
|
RUN cd backend && npm prune --omit=dev
|
|
|
|
FROM node:24-trixie-slim AS runtime
|
|
|
|
WORKDIR /app
|
|
ENV NODE_ENV=production
|
|
ENV PORT=3000
|
|
|
|
COPY --from=build /app/dist dist
|
|
COPY --from=build /app/templates templates
|
|
COPY --from=build /app/templates.json templates.json
|
|
COPY --from=build /app/backend/node_modules dist/backend/node_modules
|
|
|
|
WORKDIR /app
|
|
COPY entrypoint.sh entrypoint.sh
|
|
RUN chmod +x entrypoint.sh
|
|
|
|
EXPOSE 3000
|
|
CMD ["./entrypoint.sh"]
|