You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 29, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 29, 2025. It is now read-only.
I verified that the connection works with pg_isready, however during the build step it fails to connect to localhost (and the provided db url)
@calcom/prisma:build: Prisma schema loaded from schema.prisma
@calcom/prisma:build: Datasource "db": PostgreSQL database "calcom", schema "public" at "localhost:5432"
@calcom/prisma:build:
@calcom/prisma:build: Error: P1001: Can't reach database server at `localhost`:`5432`
@calcom/prisma:build:
@calcom/prisma:build: Please make sure your database server is running at `localhost`:`5432`.
@calcom/prisma:build: error Command failed with exit code 1.
@calcom/prisma:build: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@calcom/prisma:build: error Command failed with exit code 1.
@calcom/prisma:build: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I'm having the same issue, but in my case I had setup container_name: database on docker-compose.yaml and the build still fails. Also tried to replace the container name for the IP and it also fails.
#0 8.862 @calcom/prisma:db-deploy: Error: P1001: Can't reach database server at `172.20.0.2`:`5432`
#0 8.862 @calcom/prisma:db-deploy:
#0 8.863 @calcom/prisma:db-deploy: Please make sure your database server is running at `172.20.0.2`:`5432`.
#0 8.896 @calcom/prisma:db-deploy: error Command failed with exit code 1.
#0 8.896 @calcom/prisma:db-deploy: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
#0 8.926 @calcom/prisma:db-deploy: error Command failed with exit code 1.
#0 8.926 @calcom/prisma:db-deploy: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
#0 8.939 @calcom/prisma:db-deploy: ERROR: command finished with error: command (packages/prisma) yarn run db-deploy exited (1)
#0 8.959 command (packages/prisma) yarn run db-deploy exited (1)
#0 8.959
#0 8.959 Tasks: 2 successful, 3 total
#0 8.960 Cached: 1 cached, 3 total
#0 8.960 Time: 8.208s
#0 8.960
#0 8.994 error Command failed with exit code 1.
#0 8.995 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
------
failed to solve: executor failed running [/bin/sh -c yarn build]: exit code: 1
It didn't work using the default network created by compose. However, once I added a dedicated network it worked out by running the container on its own. FWIW, I have it running behind a reverse proxy (traefik) that requires my own custom docker-compose setup.
@brunoamaral I wrote my own docker-compose as I have a lot of custom properties for traefik (reverse-proxy) to work correctly with calcom :) I usually use the default network that gets created by docker-compose instead of specifying a new network inside the compose file. However, with the default network it didn't work in calcoms case. Why, I don't know 🤷
The issue was that Docker had been installed via Snap. To resolve it, I removed the Snap version of Docker and reinstalled it using apt. Here’s the command I used:
sudo apt install docker.io
After reinstalling Docker with this method, the issue was resolved.
Activity
finaldzn commentedon Jun 22, 2022
Is Postgres in the same container as cal.com ? If not then your postgresql instance is not reachable on local host.
Do you have a docked-compose or something like that ?
krumware commentedon Jun 22, 2022
Localhost to the container, during the build, is the container itself and not your local development machine.
The docker compose build steps are provided because it creates a network bridge which allows you to reference a postgres container to build against.
It's worth mentioning that the build does not need to reference the same database as it will reference in runtime.
brunoamaral commentedon Jun 23, 2022
I'm having the same issue, but in my case I had setup
container_name: databaseon docker-compose.yaml and the build still fails. Also tried to replace the container name for the IP and it also fails.moekify commentedon Jun 23, 2022
It didn't work using the default network created by compose. However, once I added a dedicated network it worked out by running the container on its own. FWIW, I have it running behind a reverse proxy (traefik) that requires my own custom docker-compose setup.
brunoamaral commentedon Jun 27, 2022
@moekify what do you mean by a dedicated network? As far as I know, the one in docker-compose is already shared by the three containers.
moekify commentedon Jun 27, 2022
@brunoamaral I wrote my own docker-compose as I have a lot of custom properties for traefik (reverse-proxy) to work correctly with calcom :) I usually use the default network that gets created by docker-compose instead of specifying a new network inside the compose file. However, with the default network it didn't work in calcoms case. Why, I don't know 🤷
lakmal-ya commentedon Dec 14, 2024
I encountered the same issue on Ubuntu 20.04.1 LTS (Focal Fossa). Here's the system information for reference:
The issue was that Docker had been installed via Snap. To resolve it, I removed the Snap version of Docker and reinstalled it using
apt. Here’s the command I used:After reinstalling Docker with this method, the issue was resolved.
krumware commentedon Jul 21, 2025
Closing for cleanup. This may be addressed by incoming updates.