-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.web
More file actions
29 lines (27 loc) · 854 Bytes
/
Copy pathDockerfile.web
File metadata and controls
29 lines (27 loc) · 854 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
29
# Dev stage
FROM node:22-slim AS dev
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
CMD ["npx", "vite", "--host", "0.0.0.0"]
# Build stage
FROM node:22-slim AS build
WORKDIR /app
ARG VITE_API_URL
ARG VITE_GITHUB_APP_SLUG
ENV VITE_API_URL=${VITE_API_URL}
ENV VITE_GITHUB_APP_SLUG=${VITE_GITHUB_APP_SLUG}
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
# Production stage
# Pinned to a minor: an unqualified `nginx:alpine` would put a new nginx
# major into production on the next rebuild with no diff to review.
FROM nginx:1.29-alpine AS production
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
# NOTE: nginx.conf must be in the build context (apps/web/).
# It is copied there from infra/docker/nginx.conf at build time.
# See: apps/web/nginx.conf