diff --git a/.env.example b/.env.example index a575ff5..360f6f0 100644 --- a/.env.example +++ b/.env.example @@ -19,6 +19,7 @@ API_BOOTSTRAP_TOKEN=change-me-in-production # ============================================================================= # Port Configuration (change only if you have port conflicts) +# Update both the PORT variable AND the URL variables below # ============================================================================= # Main application ports @@ -31,25 +32,27 @@ MEILI_PORT=7700 POSTGRES_PORT=5432 # ============================================================================= -# Service URLs (auto-generated from ports above - don't change unless you know what you're doing) +# Service URLs (update these when you change ports above!) # ============================================================================= # API Service -API_LISTEN_ADDR=0.0.0.0:${API_PORT} -API_BASE_URL=http://api:${API_PORT} +API_LISTEN_ADDR=0.0.0.0:8080 +API_BASE_URL=http://api:8080 # Indexer Service -INDEXER_LISTEN_ADDR=0.0.0.0:${INDEXER_PORT} +INDEXER_LISTEN_ADDR=0.0.0.0:8081 INDEXER_SCAN_INTERVAL_SECONDS=5 # Backoffice Web UI # Uses BACKOFFICE_PORT from above # Meilisearch Search Engine -MEILI_URL=http://meilisearch:${MEILI_PORT} +MEILI_URL=http://meilisearch:7700 # PostgreSQL Database -DATABASE_URL=postgres://stripstream:stripstream@postgres:${POSTGRES_PORT}/stripstream +# Note: Always use port 5432 here (internal Docker port) +# Change POSTGRES_PORT above only for the external mapping +DATABASE_URL=postgres://stripstream:stripstream@postgres:5432/stripstream # ============================================================================= # Storage Configuration diff --git a/infra/docker-compose.yml b/infra/docker-compose.yml index d5c7612..ed8ccbc 100644 --- a/infra/docker-compose.yml +++ b/infra/docker-compose.yml @@ -24,7 +24,7 @@ services: volumes: - meili_data:/meili_data healthcheck: - test: ["CMD", "wget", "-q", "-O", "-", "http://127.0.0.1:${MEILI_PORT:-7700}/health"] + test: ["CMD", "wget", "-q", "-O", "-", "http://127.0.0.1:7700/health"] interval: 10s timeout: 5s retries: 5 @@ -65,7 +65,7 @@ services: meilisearch: condition: service_healthy healthcheck: - test: ["CMD", "wget", "-q", "-O", "-", "http://127.0.0.1:${API_PORT:-8080}/health"] + test: ["CMD", "wget", "-q", "-O", "-", "http://127.0.0.1:8080/health"] interval: 10s timeout: 5s retries: 5 @@ -88,7 +88,7 @@ services: meilisearch: condition: service_healthy healthcheck: - test: ["CMD", "wget", "-q", "-O", "-", "http://127.0.0.1:${INDEXER_PORT:-8081}/health"] + test: ["CMD", "wget", "-q", "-O", "-", "http://127.0.0.1:8081/health"] interval: 10s timeout: 5s retries: 5 @@ -108,7 +108,7 @@ services: api: condition: service_healthy healthcheck: - test: ["CMD", "wget", "-q", "-O", "-", "http://host.docker.internal:${BACKOFFICE_PORT:-8082}/health"] + test: ["CMD", "wget", "-q", "-O", "-", "http://127.0.0.1:8082/health"] interval: 10s timeout: 5s retries: 5