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