Files
FRASA-CAS/apps/cotizador/Dockerfile
Consult AS Technology 05f6ceb01a feat: deploy en host LXC (nginx + systemd) y ajustes para mismo-origen
- deploy/nginx-host.conf: nginx del host sirve dist/ de las 4 apps y
  proxifica /api/ a 127.0.0.1:3000 (client_max_body_size 10m)
- deploy/frasa-api.service: API Gateway como servicio systemd
- landing: URLs relativas (/quote/, /client/, /pay/)
- Dockerfiles de apps: ARG VITE_API_URL=/api para builds same-origin
- docker-compose: NGINX_CONF parametrizado (nginx.http.conf sin SSL)
- README: instrucciones para host LXC y nota de DDNS pendiente
2026-08-22 00:05:28 +00:00

18 lines
448 B
Docker

# Etapa 1: build
FROM node:22-alpine AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
# URL del API horneada en el build (detras de NGINX es same-origin)
ARG VITE_API_URL=/api
ENV VITE_API_URL=$VITE_API_URL
RUN npm run build
# Etapa 2: servidor estático
FROM nginx:alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]