refactor: update Dockerfile to use Nginx for serving the application and adjust configuration for multi-stage build

This commit is contained in:
Alexis
2026-05-13 12:49:36 +02:00
parent a5321a6807
commit cd9ad28a98
2 changed files with 23 additions and 8 deletions
+5 -8
View File
@@ -10,13 +10,10 @@ COPY . .
RUN npm run build # genera dist/ con base=/orcid2words/
# ── Serve stage ────────────────────────────────────────────────
FROM node:20-alpine
FROM nginx:alpine
WORKDIR /app
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /app/dist /app/dist
RUN npm install -g serve
COPY --from=builder /app/dist ./dist
EXPOSE 8073
CMD ["serve", "-s", "dist", "-l", "5173"]
EXPOSE 5173
CMD ["nginx", "-g", "daemon off;"]