feat: pass VITE_API_BASE_URL to frame-cms at runtime

This commit is contained in:
2026-03-21 23:46:13 +01:00
parent e90d4292d5
commit e9223d8e16
2 changed files with 9 additions and 1 deletions

View File

@@ -17,7 +17,7 @@ git clone https://git.beatrice.wtf/panic.haus/frame-deploy
cd frame-deploy cd frame-deploy
``` ```
### 2. Configure the backend ### 2. Configure
```bash ```bash
cp backend.env.example backend.env cp backend.env.example backend.env
@@ -33,6 +33,12 @@ Edit `backend.env` and at minimum set:
| `FRONTEND_BASE_URL` | Same URL (used in email links) | | `FRONTEND_BASE_URL` | Same URL (used in email links) |
| `SMTP_*` | Optional — needed for email verification | | `SMTP_*` | Optional — needed for email verification |
`VITE_API_BASE_URL` for frame-cms defaults to `http://localhost:8080`. Override it in `docker-compose.yml` or via env:
```bash
VITE_API_BASE_URL=https://api.example.com docker compose up -d
```
### 3. Pull images and start ### 3. Pull images and start
```bash ```bash

View File

@@ -30,6 +30,8 @@ services:
restart: unless-stopped restart: unless-stopped
depends_on: depends_on:
- frame-backend - frame-backend
environment:
VITE_API_BASE_URL: ${VITE_API_BASE_URL:-http://localhost:8080}
ports: ports:
- "${CMS_PORT:-3000}:80" - "${CMS_PORT:-3000}:80"
healthcheck: healthcheck: