Skip to content

fix: update docker-compose volume mount for PostgreSQL 18+ compatibility#28282

Merged
keithwillcode merged 5 commits intocalcom:mainfrom
swalihkolakkadan:fix/postgres-18-volume-mount
Mar 6, 2026
Merged

fix: update docker-compose volume mount for PostgreSQL 18+ compatibility#28282
keithwillcode merged 5 commits intocalcom:mainfrom
swalihkolakkadan:fix/postgres-18-volume-mount

Conversation

@swalihkolakkadan
Copy link
Contributor

What does this PR do?

Updates the volume mount path in packages/prisma/docker-compose.yml from /var/lib/postgresql/data to /var/lib/postgresql to fix compatibility with PostgreSQL 18+.

PG 18 changed its data directory layout to use /var/lib/postgresql/18/main instead of /var/lib/postgresql/data (see docker-library/postgres#1259). The old mount path causes the container to fail the healthcheck and yarn dx to error out.

Visual Demo (For contributors especially)

Before (container crash loop):

@calcom/prisma:db-up: ✘ Container prisma-postgres-1 Error dependency postgres failed to start
@calcom/prisma:db-up: dependency failed to start: container prisma-postgres-1 is unhealthy

After (healthy container):

$ docker ps --filter "name=prisma"
NAMES               STATUS                    PORTS
prisma-postgres-1   Up 35 seconds (healthy)   0.0.0.0:5450->5432/tcp

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. N/A — one-line config fix, no docs needed.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works. N/A — docker-compose config change, verified manually by running yarn dx.

How should this be tested?

  1. Run docker compose -f packages/prisma/docker-compose.yml down -v to clear any existing volumes
  2. Run yarn dx
  3. Confirm the postgres container starts healthy: docker ps --filter "name=prisma" should show status as healthy

No environment variables or test data needed — this only affects the local dev database setup.

Note: Existing users with volumes from older PG versions will need to run docker compose down -v once to clear the incompatible volume. This is a local dev database so no data is lost — yarn dx re-seeds everything.

PostgreSQL 18+ stores data in /var/lib/postgresql/18/main instead of
/var/lib/postgresql/data. The volume mount needs to be at /var/lib/postgresql
to capture the new directory structure.

Fixes calcom#28281
@swalihkolakkadan swalihkolakkadan requested a review from a team as a code owner March 5, 2026 07:20
@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Mar 5, 2026
@github-actions github-actions bot added the 🐛 bug Something isn't working label Mar 5, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@keithwillcode keithwillcode enabled auto-merge (squash) March 5, 2026 17:43
@anikdhabal anikdhabal added the run-ci Approve CI to run for external contributors label Mar 5, 2026
@romitg2 romitg2 added ready-for-e2e run-ci Approve CI to run for external contributors and removed ready-for-e2e run-ci Approve CI to run for external contributors labels Mar 6, 2026
@keithwillcode keithwillcode merged commit f0a7293 into calcom:main Mar 6, 2026
89 of 95 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working community Created by Linear-GitHub Sync ready-for-e2e run-ci Approve CI to run for external contributors size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PostgreSQL container fails to start with postgres:18 due to incorrect volume mount path

5 participants