Files
website/Dockerfile
T
enricobuehler ce63faa8f3
Build & Deploy unom website / build (push) Successful in 12s
Build & Deploy unom website / deploy (push) Successful in 4s
migrate from astro+netlify to tanstack start + self-hosted
Replace the Astro static site with a TanStack Start (Bun runtime) app and
add Dockerfile + compose files so the site can be served from home-main-2
behind the home-reverse-proxy-1 Caddy instead of Netlify. CI workflow
rewritten to build a container image and SSH-deploy to the home host.
2026-05-26 10:57:16 +02:00

30 lines
589 B
Docker

FROM oven/bun:alpine AS base
RUN apk update && apk add --no-cache libc6-compat
## INSTALLER - install deps and build
FROM base AS installer
WORKDIR /app
COPY package.json bun.lock ./
RUN --mount=type=cache,target=/root/.bun/install/cache,sharing=shared \
bun install --frozen-lockfile
COPY . .
RUN bun run build
## RUNNER - minimal production image
FROM base AS runner
WORKDIR /app
RUN addgroup --system --gid 1001 bunjs && \
adduser --system --uid 1001 web
COPY --from=installer --chown=web:bunjs /app/.output ./.output
USER web
CMD ["bun", ".output/server/index.mjs"]