This repository has been archived on 2026-10-25. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Sable/Dockerfile
T
Bea 4beb29b01a refactor(docker): replace nginx with Caddy
Caddy handles SPA routing and static file serving natively without
rewrite rules, resulting in a simpler setup.
2026-03-07 19:15:58 +00:00

26 lines
533 B
Docker

## Builder
FROM --platform=$BUILDPLATFORM node:24.13.1-alpine AS builder
WORKDIR /src
ARG VITE_BUILD_HASH
ARG VITE_IS_RELEASE_TAG=false
ENV VITE_BUILD_HASH=$VITE_BUILD_HASH
ENV VITE_IS_RELEASE_TAG=$VITE_IS_RELEASE_TAG
COPY .npmrc package.json package-lock.json /src/
RUN npm ci --ignore-scripts
COPY . /src/
ENV NODE_OPTIONS=--max_old_space_size=4096
RUN npm run build
## Dist
FROM scratch AS site-dist
COPY --from=builder /src/dist /
## App
FROM caddy:2-alpine
COPY --from=site-dist / /app
COPY Caddyfile /etc/caddy/Caddyfile