-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.web
More file actions
22 lines (21 loc) · 850 Bytes
/
Copy pathDockerfile.web
File metadata and controls
22 lines (21 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# VICI SPA image for Fly.io: builds the static SvelteKit output and serves it
# with nginx + SPA fallback. Vite inlines VITE_* vars at build time, so they
# are build ARGs, not runtime secrets. Not wired into any deploy yet; the
# manual workflow is .github/workflows/web2-deploy.yml.
FROM node:24-slim AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
# Placeholders for the web2 seam: the API origin the SPA calls and the backend
# mode switch. Both default to off/empty so an image built today behaves
# exactly like the current production bundle.
ARG VITE_WEB2_API_URL=""
ARG VITE_BACKEND=""
ENV VITE_WEB2_API_URL=$VITE_WEB2_API_URL
ENV VITE_BACKEND=$VITE_BACKEND
RUN npm run build
FROM nginx:alpine
COPY nginx.web.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/build /usr/share/nginx/html
EXPOSE 8080