Production deployment
Both services build from the repo root (monorepo). The frontend container runs
nginx, which serves the built SPA at / and reverse-proxies /api to the
backend container. Only the frontend port needs to be published — the backend
is reached internally over the compose network as backend:8000.
host.com/ -> frontend (nginx static SPA)
host.com/api/... -> backend (FastAPI, /api prefix stripped)
Build
echo $VITE_API_TARGET=http://192.168.1.21:8000 > .build/prod/.env
docker compose -f .build/prod/compose.yml up -d --build
Running from published images
- compose.yml
services:
backend:
hostname: backend
image: git.shihaam.dev/sarlink/radadmin/backend
env_file:
- .env
frontend:
hostname: frontend
image: git.shihaam.dev/sarlink/radadmin/frontend
ports:
- 8000:80
depends_on:
- backend
- Create
compose.ymlwith the above yaml - Create .env and fill
# --- Database (FreeRADIUS) ---
DB_HOST=raddb
DB_PORT=3306
DB_USER=radadmin
DB_PASSWORD=changeme
DB_NAME=radius
# --- API ---
API_KEY=changeme