Fix: rename db -> fitness-db to avoid DNS collision with Coolify's postgres

ROOT CAUSE FOUND: 'db' resolved to multiple IPs on the Docker network.
Coolify's own PostgreSQL (or another stack's) also responds to 'db'
via the predefined network. Our backend was connecting to the WRONG
postgres — one that requires password auth.

Fix: rename service from 'db' to 'fitness-db' so the hostname is unique.
This commit is contained in:
claude 2026-03-15 21:54:51 +00:00
parent 25d15c38ce
commit 434db38f0d
3 changed files with 6 additions and 8 deletions

View file

@ -5,8 +5,8 @@ from functools import lru_cache
class Settings(BaseSettings):
# Database - default uses trust auth (no password) matching Coolify's postgres setup
database_url: str = "postgresql+asyncpg://fitness@db:5432/fitness_rewards"
# Database - hostname 'fitness-db' avoids collision with other 'db' containers on Coolify network
database_url: str = "postgresql+asyncpg://fitness@fitness-db:5432/fitness_rewards"
# Auth
secret_key: str = "change-me-in-production"