feat: switch to dynamic env for Umami to allow runtime configuration
All checks were successful
Build and Push Docker Image to Gitea / build-and-push (push) Successful in 4m41s

This commit is contained in:
2026-02-21 11:47:32 +01:00
parent 2be36a679d
commit ad83fb553a
3 changed files with 28 additions and 42 deletions

View File

@@ -6,9 +6,8 @@ SvelteKit's `PUBLIC_*` environment variables are **baked into the JavaScript** a
1. ✅ Changing `PUBLIC_API_URL`
2. ✅ Changing `PUBLIC_URL`
3. ✅ Changing `PUBLIC_UMAMI_ID`
4. ✅ Changing `PUBLIC_UMAMI_SCRIPT`
5. ❌ NOT needed for Directus env vars (those are runtime)
3. ❌ NOT needed for `PUBLIC_UMAMI_ID` or `PUBLIC_UMAMI_SCRIPT` (those are runtime)
4. ❌ NOT needed for Directus env vars (those are runtime)
## Quick Rebuild Process
@@ -24,6 +23,7 @@ Set your production values:
```bash
PUBLIC_API_URL=https://sexy.pivoine.art/api
PUBLIC_URL=https://sexy.pivoine.art
# Note: PUBLIC_UMAMI_* can also be set at runtime in docker-compose
PUBLIC_UMAMI_ID=your-umami-id
PUBLIC_UMAMI_SCRIPT=https://umami.pivoine.art/script.js
```
@@ -251,8 +251,7 @@ These are runtime environment variables and can be changed in docker-compose.
|--------|----------------|--------------|
| `PUBLIC_API_URL` | ✅ Yes | Rebuild image |
| `PUBLIC_URL` | ✅ Yes | Rebuild image |
| `PUBLIC_UMAMI_ID` | ✅ Yes | Rebuild image |
| `PUBLIC_UMAMI_SCRIPT` | ✅ Yes | Rebuild image |
| `PUBLIC_UMAMI_*` | ❌ No | Restart container |
| `SEXY_DIRECTUS_*` | ❌ No | Restart container |
| `DB_*` | ❌ No | Restart container |
| `EMAIL_*` | ❌ No | Restart container |