feat: pass VITE_API_BASE_URL to frame-cms at runtime
This commit is contained in:
@@ -17,7 +17,7 @@ git clone https://git.beatrice.wtf/panic.haus/frame-deploy
|
||||
cd frame-deploy
|
||||
```
|
||||
|
||||
### 2. Configure the backend
|
||||
### 2. Configure
|
||||
|
||||
```bash
|
||||
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) |
|
||||
| `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
|
||||
|
||||
```bash
|
||||
|
||||
@@ -30,6 +30,8 @@ services:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- frame-backend
|
||||
environment:
|
||||
VITE_API_BASE_URL: ${VITE_API_BASE_URL:-http://localhost:8080}
|
||||
ports:
|
||||
- "${CMS_PORT:-3000}:80"
|
||||
healthcheck:
|
||||
|
||||
Reference in New Issue
Block a user