OK, after spending a few hours on it, i think i fi...
# docker
j
OK, after spending a few hours on it, i think i figured out a fix: 1. Currently, internal creation of
DATABASE_URL
value from the env for the prisma build step seems to be broken. Notice above, where the error message says ‘Error: P1001: Can’t reach database server at `database`:`5432`’. (The additional backtick marks seems suspicious.) What DOES work is passing in this value via the command line, like:
DOCKER_BUILDKIT=0 docker compose build --build-arg DATABASE_URL=<postgresql://postgres:postgres@host:5432/database> calcom
. (I tested setting the URL component values in the env to the same values as passed in via the command line like above: The env method failed and the command line method worked.) 2. The LAN IP address of the
database
container needs to be used at the command line, not the generic
database:5432
addressing. That is, before calling the above command, the user needs to
docker-compose up database --detach
,
docker exec -it database bash
, inside the
database
container get the LAN IP address via
hostname -I
, and then use that value as the appropriate URL host address within the command above. Example:
DOCKER_BUILDKIT=0 docker compose build --build-arg DATABASE_URL=<postgresql://postgres:postgres@172.24.0.2:5432/database> calcom
c
as mentioned in GH, there is something going on here. you really shouldn't need to do all of that. Can you post info on what docker runtime you're using? (for example I use Rancher Desktop, which uses the runtime moby under the hood)
j
any idea how i find this out? i just used
brew install docker
on macOS and live on the command line.