diff --git a/.build/prod/README.md b/.build/prod/README.md index 7839b0e..42eec5e 100644 --- a/.build/prod/README.md +++ b/.build/prod/README.md @@ -11,25 +11,21 @@ host.com/ -> frontend (nginx static SPA) host.com/api/... -> backend (FastAPI, /api prefix stripped) ``` -### Build & run +### Build ```sh -cp .env.example .env # VITE_API_TARGET (dev proxy only) -cp ../../backend/.env.example ../../backend/.env # DB creds, API_KEY, etc. +echo $VITE_API_TARGET=http://192.168.1.21:8000 > .build/prod/.env docker compose -f .build/prod/compose.yml up -d --build ``` - -The portal is then available on `http://HOST:8000`. - ### Running from published images - +- compose.yml ```yml services: backend: hostname: backend image: git.shihaam.dev/sarlink/radadmin/backend env_file: - - backend.env + - .env frontend: hostname: frontend image: git.shihaam.dev/sarlink/radadmin/frontend @@ -38,3 +34,16 @@ services: 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 +```