Skip to content

Conversation

@imKXNNY
Copy link

@imKXNNY imKXNNY commented Dec 16, 2025

  • Problem: docker compose --profile with-db up fails with Postgres 18+ complaining about an "unused mount/volume" at /var/lib/postgresql/data.
  • Root cause: compose mounts the named volume at the legacy path (/var/lib/postgresql/data), but Postgres 18+ uses a major-version-specific data layout and expects a single mount at /var/lib/postgresql.
  • Fix: mount postgres_data at /var/lib/postgresql (no /data).
  • Test (fresh volume recommended):
    docker compose --profile with-db down -v; docker compose --profile with-db up -d --build
    Result: postgres becomes healthy and app-with-db starts successfully.

Windows note: ; works in PowerShell. On Linux/macOS use && to chain commands.

@renecannao
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants