Add Axum backend, Dockerfiles, and K8s deployment manifests

- Axum backend server: health check, transfer matrix cache (base64 BYTEA),
  route cache (JSONB), CORS, gzip compression, tracing
- Postgres schema: transfer_matrices + cached_routes tables with upserts
- Dockerfile.frontend: 3-stage (wasm-pack → SvelteKit → nginx:alpine)
- Dockerfile.backend: 2-stage (rust build → debian:bookworm-slim)
- nginx.conf: SPA fallback, WASM mime type, /api proxy to backend
- docker-compose.yml: Postgres + backend for local development
- K8s manifests: namespace, frontend/backend deployments with services,
  ingress routing, health probes, secret-based DATABASE_URL

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-08 12:22:07 -07:00
parent 21c842acdc
commit 47ef19d76c
12 changed files with 583 additions and 5 deletions

28
docker-compose.yml Normal file
View File

@@ -0,0 +1,28 @@
version: "3.9"
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: massdriver
POSTGRES_PASSWORD: massdriver
POSTGRES_DB: massdriver
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
backend:
build:
context: .
dockerfile: Dockerfile.backend
ports:
- "3001:3001"
environment:
DATABASE_URL: postgres://massdriver:massdriver@postgres:5432/massdriver
PORT: "3001"
depends_on:
- postgres
volumes:
pgdata: