Skip to content

fix(dev): recreate postgres container and sync DATABASE_URL to localhost #37

@pentaxis93

Description

@pentaxis93

Summary

The PostgreSQL container is still running with the old Tailscale IP binding (100.125.136.73:5433) from before commit 35f6630, which fixed docker-compose.yml to default to 127.0.0.1. The container was never recreated, so the fix isn't in effect. Additionally, server/.env still points DATABASE_URL at the Tailscale IP, and the test conftest hardcodes localhost:5433.

This causes all server tests to fail with "connection refused" on localhost:5433.

Current State

  • docker-compose.yml: correctly defaults POSTGRES_BIND to 127.0.0.1 (fixed in 35f6630)
  • Running container: still bound to 100.125.136.73:5433 (pre-fix)
  • server/.env: DATABASE_URL points to 100.125.136.73:5433
  • conftest.py: hardcodes localhost:5433 (correct for intended setup)

Fix

  1. Update server/.env DATABASE_URL to use localhost:5433
  2. Recreate containers: docker compose up -d (picks up the 127.0.0.1 default)
  3. Verify uv run pytest connects successfully

Mobile app is unaffected — the server container reaches PostgreSQL via Docker internal networking (postgres:5432), not the host port binding.

Acceptance Criteria

  • PostgreSQL container bound to 127.0.0.1:5433
  • server/.env DATABASE_URL uses localhost:5433
  • uv run pytest can connect to the database

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions