codigo0/promo-site/Dockerfile
Javier b62700221e
Some checks are pending
Deploy Código 0 / deploy (push) Waiting to run
fix: use legacy-peer-deps for promo-site build and solve deployment bottleneck
2026-03-25 12:38:29 +01:00

24 lines
578 B
Docker

FROM node:20-alpine as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install --legacy-peer-deps
COPY . .
RUN npm run build
FROM nginx:alpine
COPY --from=build-stage /app/dist /usr/share/nginx/html
# Configuración para React Router
RUN echo 'server { \
listen 80; \
location / { \
root /usr/share/nginx/html; \
index index.html; \
try_files $uri $uri/ /index.html; \
} \
location /api { \
proxy_pass http://codigo0-backend:3000; \
} \
}' > /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]