diff --git a/deploy/docker-compose.standalone.yml b/deploy/docker-compose.standalone.yml index f40b286..9475ece 100644 --- a/deploy/docker-compose.standalone.yml +++ b/deploy/docker-compose.standalone.yml @@ -21,7 +21,9 @@ x-backend: &backend network_mode: host env_file: ${ENV_FILE:-.env} environment: - DATABASE_URL: postgres://atm:${POSTGRES_PASSWORD}@127.0.0.1:5432/atm + # Password via PGPASSWORD (read by the PostgreSQL driver): any character works; in the URL "/", "+" or "@" break it. + DATABASE_URL: postgres://atm@127.0.0.1:5432/atm + PGPASSWORD: ${POSTGRES_PASSWORD} HTTP_PROXY: ${HTTP_PROXY:-} HTTPS_PROXY: ${HTTPS_PROXY:-} NO_PROXY: ${NO_PROXY:-},localhost,127.0.0.1 diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml index 21ff4eb..181bc75 100644 --- a/deploy/docker-compose.yml +++ b/deploy/docker-compose.yml @@ -26,7 +26,9 @@ x-backend: &backend restart: unless-stopped env_file: ${ENV_FILE:-.env} environment: - DATABASE_URL: postgres://atm:${POSTGRES_PASSWORD}@db:5432/atm + # Password via PGPASSWORD (read by the PostgreSQL driver): any character works; in the URL "/", "+" or "@" break it. + DATABASE_URL: postgres://atm@db:5432/atm + PGPASSWORD: ${POSTGRES_PASSWORD} # Player heads (mc-heads.net) go through the proxy; Compose-internal names and the database never do. # SFTP to the game server is a direct SSH connection and does not use these variables. HTTP_PROXY: ${HTTP_PROXY:-} diff --git a/docs/OPERATIONS.md b/docs/OPERATIONS.md index b3ea527..3870989 100644 --- a/docs/OPERATIONS.md +++ b/docs/OPERATIONS.md @@ -63,7 +63,7 @@ Standalone-Variante nutzt deshalb für Build und Betrieb das Host-Netzwerk des L nano deploy/.env ``` - `TRUST_PROXY` = IP des Traefik-Servers (nur er darf die Client-IP weitergeben) - - `INGEST_HMAC_SECRET`, `POSTGRES_PASSWORD` (nur Buchstaben und Ziffern, das Passwort steht in einer URL) + - `INGEST_HMAC_SECRET` und `POSTGRES_PASSWORD` (z. B. mit `openssl rand -hex 32`; Sonderzeichen sind erlaubt) - bei Bedarf `HTTP_PROXY`/`HTTPS_PROXY`/`NO_PROXY` (siehe „Ausgehender Proxy“) - `DOMAIN`, `TRAEFIK_*` und `INGEST_ALLOWED_IPS` werden in dieser Variante nicht genutzt (das regelt Traefik selbst, siehe unten) 3. **Starten:** @@ -129,7 +129,7 @@ Standalone-Variante nutzt deshalb für Build und Betrieb das Host-Netzwerk des L git clone atm10-stats && cd atm10-stats cp deploy/.env.example deploy/.env openssl rand -hex 32 # Wert für INGEST_HMAC_SECRET -openssl rand -base64 24 # Wert für POSTGRES_PASSWORD +openssl rand -hex 24 # Wert für POSTGRES_PASSWORD nano deploy/.env # DOMAIN, TRAEFIK_*, INGEST_ALLOWED_IPS, Secrets, optional SFTP_* docker compose -f deploy/docker-compose.yml --env-file deploy/.env up -d --build docker compose -f deploy/docker-compose.yml --env-file deploy/.env ps # api, web, db: healthy