ce63faa8f3
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.
30 lines
589 B
Docker
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"]
|