Files
radadmin/.build/prod
shihaam 251efd4d0c
build-and-push / build (push) Failing after 24s
update deploy docs
2026-08-01 03:15:32 +05:00
..
2026-08-01 00:12:10 +05:00
2026-08-01 00:51:08 +05:00
2026-08-01 03:15:32 +05:00

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.yml with 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