Migrated to NodeJS/Vite/Express/Material UI 2 #1
19
Dockerfile
19
Dockerfile
@@ -1,29 +1,30 @@
|
||||
FROM node:24-trixie-slim AS build
|
||||
|
||||
WORKDIR /app-new
|
||||
WORKDIR /app
|
||||
|
||||
COPY app-new/backend/package*.json backend/
|
||||
COPY app-new/frontend/package*.json frontend/
|
||||
RUN cd backend && npm install
|
||||
RUN cd frontend && npm install
|
||||
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-new
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
ENV PORT=3000
|
||||
|
||||
COPY app-new/backend/package*.json ./
|
||||
RUN npm ci --omit=dev
|
||||
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
|
||||
|
||||
COPY --from=build /app-new/dist dist
|
||||
COPY --from=build /app-new/templates templates
|
||||
COPY --from=build /app-new/templates.json templates.json
|
||||
WORKDIR /app
|
||||
COPY entrypoint.sh entrypoint.sh
|
||||
RUN chmod +x entrypoint.sh
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
set -eu
|
||||
|
||||
exec node /app-new/dist/backend/server.js
|
||||
exec node /app/dist/backend/server.js
|
||||
|
||||
Reference in New Issue
Block a user