update environment configuration for local development, enhance database initialization, and improve Nginx routing for admin access

This commit is contained in:
zwitschi committed 2026-08-03 14:26:11 +02:00
1 parent 2e061dff28
commit 1ae0ad121b
10 files changed
+185 -37

No files matched your search

+17 -10
View File
@@ -54,9 +54,14 @@ This guide covers prerequisites, environment setup, running the application loca
MEDIA_DOMAIN=media.linearvoid.tv
# Public frontend URLs
VITE_PUBLIC_APP_URL=http://localhost:8080
VITE_PUBLIC_WS_URL=ws://localhost:3000/ws
VITE_PUBLIC_HLS_URL=http://localhost:8080/hls/playlist.m3u8
# Preferred local setup uses the real public domains through Cloudflare and Nginx Proxy Manager.
VITE_PUBLIC_APP_URL=https://linearvoid.tv
VITE_PUBLIC_WS_URL=wss://linearvoid.tv/ws
VITE_PUBLIC_HLS_URL=https://media.linearvoid.tv/hls/playlist.m3u8
# Optional direct-local fallback when bypassing the public proxy:
# VITE_PUBLIC_APP_URL=http://localhost
# VITE_PUBLIC_WS_URL=ws://localhost/ws
# VITE_PUBLIC_HLS_URL=http://localhost/hls/playlist.m3u8
# Gitea Container Registry (for self-hosted Docker images)
GITEA_REGISTRY_URL=git.allucanget.biz
@@ -65,10 +70,10 @@ This guide covers prerequisites, environment setup, running the application loca
GITEA_REGISTRY_NAMESPACE=zwitschi/linearvoid
# Chat / Database
DATABASE_URL=postgres://user:password@localhost:5432/linearvoid
# or for SQLite in local development:
DATABASE_URL=postgres://linearvoid:linearvoid@db:5432/linearvoid?sslmode=disable
# or for SQLite-only local development:
# DATABASE_URL=sqlite://./data/chat.db
REDIS_URL=redis://localhost:6379/0
REDIS_URL=redis://redis:6379/0
# Ports (for local development)
PLAYOUT_PORT=8080
@@ -98,7 +103,7 @@ This guide covers prerequisites, environment setup, running the application loca
4. **Check local value overrides for Docker Compose**:
- `docker-compose.yml` builds images locally and maps the frontend build output from `frontend/dist` into nginx.
- `docker-compose.prod.yml` pulls prebuilt images from the Gitea registry.
- For production on the VPS, change hostnames in `.env` so containers talk to each other over the compose network, for example `REDIS_URL=redis://redis:6379/0` and `DATABASE_URL=postgres://linearvoid:<password>@db:5432/linearvoid`.
- Internal container-to-container URLs should use compose hostnames, for example `REDIS_URL=redis://redis:6379/0` and `DATABASE_URL=postgres://linearvoid:<password>@db:5432/linearvoid?sslmode=disable`.
- For production public routing, set `VITE_PUBLIC_APP_URL=https://linearvoid.tv`, `VITE_PUBLIC_WS_URL=wss://linearvoid.tv/ws`, and `VITE_PUBLIC_HLS_URL=https://media.linearvoid.tv/hls/playlist.m3u8`.
5. **Create Data Directories**:
@@ -182,9 +187,10 @@ This guide covers prerequisites, environment setup, running the application loca
```
2. **Access the Application**:
- Viewer: <http://localhost:8080>
- Chat WebSocket: `ws://localhost:3000/ws` when using the local env defaults, or `ws://localhost:8080/ws` if you switch to same-origin local routing.
- Admin Interface: <http://localhost:8080/admin> (use the credentials from `.env` or default admin/admin)
- Preferred local access with the documented proxy setup: <https://linearvoid.tv>
- Admin Interface: <https://linearvoid.tv/admin>
- Chat WebSocket: `wss://linearvoid.tv/ws`
- Direct-local fallback when bypassing Cloudflare/Nginx Proxy Manager: <http://localhost>, <http://localhost/admin>, and `ws://localhost/ws`
- Health Checks:
- Playout: <http://localhost:8081/health>
- Chat: <http://localhost:3000/health>
@@ -239,6 +245,7 @@ This guide covers prerequisites, environment setup, running the application loca
- Keep `MEDIA_DOMAIN`, R2 credentials, and Gitea registry values consistent with the external infrastructure.
- Set `MEDIA_DOMAIN=media.linearvoid.tv`.
- Set `VITE_PUBLIC_APP_URL=https://linearvoid.tv`, `VITE_PUBLIC_WS_URL=wss://linearvoid.tv/ws`, and `VITE_PUBLIC_HLS_URL=https://media.linearvoid.tv/hls/playlist.m3u8`.
- If you intentionally bypass the public proxy for local-only testing, switch those values to `http://localhost`, `ws://localhost/ws`, and `http://localhost/hls/playlist.m3u8`.
4. **Create runtime directories on the server**: