- Dockerfile now copies VERSION into /build/web/VERSION for vite - vite.config.ts tries ../VERSION (local dev) then ./VERSION (Docker)
20 lines
626 B
Docker
20 lines
626 B
Docker
# Dockerfile for the oikos control-room SPA. Built separately from the
|
|
# oikos binary (compose/oikos/Dockerfile) — see docker-compose.yml's `web`
|
|
# service. The outer production Caddy (caddy-conf repo, LXC 121) handles
|
|
# Authentik + splits /api/*, /mcp, /agent/* off to the api service; this
|
|
# container only serves static files with SPA-fallback routing.
|
|
|
|
FROM node:22-alpine AS builder
|
|
|
|
WORKDIR /build/web
|
|
COPY web/package.json web/package-lock.json ./
|
|
RUN npm ci
|
|
COPY VERSION ./
|
|
COPY web/ ./
|
|
RUN npm run build
|
|
|
|
FROM caddy:2-alpine
|
|
|
|
COPY --from=builder /build/web/dist /srv
|
|
COPY compose/web/Caddyfile /etc/caddy/Caddyfile
|