-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (21 loc) · 881 Bytes
/
Dockerfile
File metadata and controls
28 lines (21 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#----------------------------------------------------------------------
# cartesgouvfr-guichet-collaboratif : Génération d'un build statique
#----------------------------------------------------------------------
FROM node:22-alpine AS builder
ARG http_proxy=""
ARG https_proxy=$http_proxy
ARG HTTP_PROXY=$http_proxy
ARG HTTPS_PROXY=$http_proxy
WORKDIR /app
COPY . .
RUN npm ci \
&& VITE_BASE_URL="" VITE_FRONT_URL="/guichet-collaboratif" npm run build
#----------------------------------------------------------------------
# cartesgouvfr-guichet-collaboratif : Config d'un serveur statique avec nginx
#----------------------------------------------------------------------
FROM nginxinc/nginx-unprivileged:alpine-slim
COPY --from=builder /app/dist /usr/share/nginx/html/
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 8082
USER nginx
CMD ["nginx", "-g", "daemon off;"]