codigo0/promo-site/Dockerfile
Javier 5cbe03c1e0
Some checks are pending
Deploy Código 0 / deploy (push) Waiting to run
feat: transform promo-site into React portal with integrated admin and glassmorphism
2026-03-25 12:34:33 +01:00

24 lines
559 B
Docker

FROM node:20-alpine as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
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;"]