docker icon indicating copy to clipboard operation
docker copied to clipboard

docker compose build fail

Open sjcotto opened this issue 2 years ago • 9 comments

hi there, was trying to install the docker-compose "as is" without any change but it's giving the following error

@calcom/prisma:build: error: Environment variable not found: DATABASE_URL. @calcom/prisma:build: --> schema.prisma:6 @calcom/prisma:build: | @calcom/prisma:build: 5 | provider = "postgresql" @calcom/prisma:build: 6 | url = env("DATABASE_URL") @calcom/prisma:build: | @calcom/prisma:build: @calcom/prisma:build: Validation Error Count: 1 @calcom/prisma:build:

not sure if the solution will be to add the DATABASE_URL into the ARG of the Dockerfile

anyone can help?

sjcotto avatar May 15 '22 17:05 sjcotto

I am having the same issue

apitel avatar May 16 '22 18:05 apitel

Anyone found a solution ?

kaddour-youcef avatar May 17 '22 01:05 kaddour-youcef

@kaddour-youcef here is a repo that builds from the non docker files and creates a docker container: https://github.com/speckm/calendso-docker

theRealBithive avatar May 17 '22 12:05 theRealBithive

Facing the same issue

SebastiaanVanspauwen avatar May 17 '22 17:05 SebastiaanVanspauwen

If possible, please try the changes in #112. Prior to building, you can run docker compose up -d database, to make a database available, then use host.docker.internal as the hostname for the DATABASE_URL arg, and that will successfully validate the prisma schemas. Afterwards you can change your database host back to the desired runtime database.

krumware avatar May 17 '22 18:05 krumware

@kaddour-youcef here is a repo that builds from the non docker files and creates a docker container: https://github.com/speckm/calendso-docker

This doesn't work unfortunately.

Th0masDB avatar May 22 '22 15:05 Th0masDB

@Th0masDB #112 worked for me

SebastiaanVanspauwen avatar May 22 '22 15:05 SebastiaanVanspauwen

@Th0masDB #112 worked for me

Unfortuanly for me it doesn't.... It makes the container.... But the container won't run with this error (but I think this is another topic):

/calcom/scripts/start.sh:4

scripts/wait-for-it.sh ${DATABASE_HOST} -- echo "database is up"

             ^^^

SyntaxError: Unexpected token 'for'

    at wrapSafe (internal/modules/cjs/loader.js:1001:16)

    at Module._compile (internal/modules/cjs/loader.js:1049:27)

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)

    at Module.load (internal/modules/cjs/loader.js:950:32)

    at Function.Module._load (internal/modules/cjs/loader.js:790:12)

    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)

    at internal/main/run_main_module.js:17:47

Th0masDB avatar May 22 '22 17:05 Th0masDB

I dont know about the docker it did not work, but you can build it from the repo it worked for me ! I'm just facing a bigger issue here, knowing what is open-source and what is not. it's realy not clear for me and there is no docs to explain that what functionality you can use and ...

kaddour-youcef avatar May 22 '22 19:05 kaddour-youcef