fix: make ZERO_QUERY_URL portable across all environments

- Default to Docker service networking (http://frontend:3000) in both
  compose files — works when all services run in Docker
- Add extra_hosts (host.docker.internal:host-gateway) for cross-platform
  host access when running frontend outside Docker
- Document override examples in .env.example for local dev and
  custom domain setups
This commit is contained in:
CREDO23 2026-03-24 15:06:58 +02:00
parent 8dd539c384
commit cab33d9f4c
3 changed files with 13 additions and 1 deletions

View file

@ -162,6 +162,8 @@ services:
image: rocicorp/zero:0.26.2
ports:
- "${ZERO_CACHE_PORT:-5929}:4848"
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
ZERO_UPSTREAM_DB: ${ZERO_UPSTREAM_DB:-postgresql://${DB_USER:-surfsense}:${DB_PASSWORD:-surfsense}@${DB_HOST:-db}:${DB_PORT:-5432}/${DB_NAME:-surfsense}?sslmode=${DB_SSLMODE:-disable}}
ZERO_CVR_DB: ${ZERO_CVR_DB:-postgresql://${DB_USER:-surfsense}:${DB_PASSWORD:-surfsense}@${DB_HOST:-db}:${DB_PORT:-5432}/${DB_NAME:-surfsense}?sslmode=${DB_SSLMODE:-disable}}