The SPA-from-binary split (0c0f35a) left `make deploy-ui` pointing at a
deploy path that was never actually wired up: scp to a "mac-mini" SSH
host that doesn't resolve from itself, a /var/www/oikos-ui/ that doesn't
exist, and `systemctl reload caddy` on a box with no Caddy installed at
all (not brew, not a container, nothing on 80/443).
Add a `web` service (compose/web/Dockerfile: node build -> caddy:2-alpine
static + SPA-fallback serving) to docker-compose.yml so the UI deploys
through the same push-to-main -> webhook -> docker compose build/up
pipeline the rest of the stack already uses, instead of a manual
scp/ssh step. Drop the broken `deploy-ui` Makefile target; `make ui`
stays as a local build sanity-check.
Update the reference Caddy config (compose/caddy/Caddyfile.oikos) to
reverse_proxy the new :8091 service instead of reading static files off
local disk, and fill in the <mac-mini-mesh-ip> placeholders with the
actual LAN IP (192.168.178.182 — the LXC and mac-mini subnets are
routed). This file is a reference only; the real caddy-conf repo change
is applied separately after review.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
19 lines
610 B
Docker
19 lines
610 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 web/ ./
|
|
RUN npm run build
|
|
|
|
FROM caddy:2-alpine
|
|
|
|
COPY --from=builder /build/web/dist /srv
|
|
COPY compose/web/Caddyfile /etc/caddy/Caddyfile
|