https://cal.com logo
#teams
Title
# teams
p

Peer

05/08/2022, 3:57 PM
Hey @Jimmy Chan, where does it say that? Can you DM me?
you can change the user records to “PRO” in the database
j

Jimmy Chan

05/08/2022, 3:58 PM
i mean i clicked sign up in my self hosted instance. and it took me to a page saying i needed a commercial license to sign up. Or i can add users using prisma studio
just curious since i paid for infrastructure does that mean i can unlock signups
a

Agusti

05/11/2022, 2:04 PM
Hello Jimmy! We just shipped this yesterday. and it’s available as a replacement file for /pages/auth/signup.tsx in our API repo, if you have the infraestructure license you can ask @Peer to add you to our repo by providing him any github usernames that need access, and get it from there. Let me know if you need help setting it up or have any issues. https://github.com/calcom/api/tree/main/auth
j

Jimmy Chan

05/11/2022, 4:41 PM
i’m having trouble getting cal to run. I feel like i’ve set it up properly but its not even building anymore
i have no missing migrations on prisma
a

Agusti

05/11/2022, 4:41 PM
Can you share some screenshots about the build errors? Or try with a clean install?Sometimes it happens
the signup change shouldn’t affect anything on deps/build process, it’s just a new page in the frontend
j

Jimmy Chan

05/11/2022, 4:42 PM
message has been deleted
i haven’t tried the sign up page yet because i want to make sure i have a working base to start with
a

Agusti

05/11/2022, 4:43 PM
are you on latest main/prod?
j

Jimmy Chan

05/11/2022, 4:43 PM
i believe so
a

Agusti

05/11/2022, 4:43 PM
can you git checkout main and git pull
and try a clean install there
yarn clean should remove everything and you can do a yarn install and yarn dx then
j

Jimmy Chan

05/11/2022, 4:45 PM
i dont want to use docker compose
i have a db setup elsewhere
a

Agusti

05/11/2022, 4:45 PM
Right, that shouldn’t be a problem
just change the DTABASE_URL env to yours
and you don’t need docker
yarn dx does more stuff though
j

Jimmy Chan

05/11/2022, 4:46 PM
o ok
a

Agusti

05/11/2022, 4:46 PM
so be sure to run it, and let the docker stuff fail (It shouldnt though will run migrations on your actual postgres db I think)
Also have in mind SAML also requires docker for an extra database run on same docker image than base postgres
j

Jimmy Chan

05/11/2022, 4:48 PM
if i dont need SAML can cal be run in a stateless container?
a

Agusti

05/11/2022, 4:48 PM
Sorry I don’t follow, what do you mean exactly I’m no docker expert here
j

Jimmy Chan

05/11/2022, 4:48 PM
ideally i want to try running it in cloud run or as a pod
a

Agusti

05/11/2022, 4:48 PM
Yeah you can use whatever I think, we only use docker for the databases so far
And running of migrations maybe I think
j

Jimmy Chan

05/11/2022, 4:49 PM
i mean is everything persistent stored in postgres
a

Agusti

05/11/2022, 4:49 PM
Yeah, we don’t have any other data stores
no volumes with images/data or such if that’s what you ask
We deploy to Vercel directly btw
it’s a nextjs app after all
j

Jimmy Chan

05/11/2022, 4:50 PM
the one thing i ran into when making my own dockerfile is that prisma generate seems to require connecting to my db, but since its in an intermediate build stage it seems to not be able to use my host network
i see
j

Jimmy Chan

05/11/2022, 4:50 PM
perhaps i should just mimic your deploy
a

Agusti

05/11/2022, 4:50 PM
This might be of help
j

Jimmy Chan

05/11/2022, 4:51 PM
i’ve read that before haha
a

Agusti

05/11/2022, 4:51 PM
Basically the cal.com repo is just a nextjs app, as long as you provide to it a valid postgres database under DATABASE_URL, it should work for you
We are on Prisma Cloud so our database is an AWS RDS instance at the end of the day. But you can use whatever cloud provider you want for this or your own hosted instance or whatever as long as you provide a valid connect url
j

Jimmy Chan

05/11/2022, 4:52 PM
ok understood
a

Agusti

05/11/2022, 4:53 PM
Docker is just a nicety on DX side in local development, and an extra for heroku/other platforms users that do want a dockerfile/kubernetes config to deploy. But we don’t offer official support for this yet, it’s community.
j

Jimmy Chan

05/11/2022, 4:54 PM
ive looked at the community docker repo and basically the main issue for me was the host network problem when running prisma generate in my intermediate build stage
the community uses docker-compose so it could share an internal network with the postgres container
a

Agusti

05/11/2022, 4:55 PM
Yeah, I’m super out of my scope with that, so I’d recommend skipping docker if you’re happy with that
j

Jimmy Chan

05/11/2022, 4:55 PM
im trying to run this on a barebones instance for a trial
so i didnt want to install docker and stuff
a

Agusti

05/11/2022, 4:56 PM
yep
deploy to vercel
and add a free postgres instance from whatever cloud provider you want
then
j

Jimmy Chan

05/11/2022, 4:56 PM
will the admin and api work in vercel?
👍 1
a

Agusti

05/11/2022, 4:56 PM
that’s what we use yeah
j

Jimmy Chan

05/11/2022, 4:56 PM
ok cool
i get a bunch of type errors
a

Agusti

05/11/2022, 4:56 PM
on api/
screenshot?
j

Jimmy Chan

05/11/2022, 4:57 PM
message has been deleted
app/web
the same type errors
a

Agusti

05/11/2022, 4:57 PM
Yeah that’s super weird , which branch are you rnning?
j

Jimmy Chan

05/11/2022, 4:58 PM
main
and i recursed all submodules
or am i missing some submodule
like lacking permissions
a

Agusti

05/11/2022, 4:59 PM
I don’t think it’s that
all the private submodules shouldn’t be required to build/run web
j

Jimmy Chan

05/11/2022, 5:00 PM
if i ignore this type error i get prisma client type errors like its missing Userplan
and some other fields
a

Agusti

05/11/2022, 5:00 PM
Try production
branch
instead
j

Jimmy Chan

05/11/2022, 5:01 PM
ok
while its installing, do you know if i can deploy the different apps and packages individually
like if i want to run api separately from the rest of cal
or if i dont want to include all the packages
like the integrations
a

Agusti

05/11/2022, 5:05 PM
api works separately yeah
just need a database, that has run the migrations and seed
and you will need to generate valid apikeys through web first
But yeah each app is a separate deployment in the frontend, all talk to same database
j

Jimmy Chan

05/11/2022, 5:07 PM
i get the same issue with production branch
same type errors
i’ll try installing docker so i can use dx
a

Agusti

05/11/2022, 5:10 PM
🙏
Let me know if that fixes it for you, I think that should do it
j

Jimmy Chan

05/11/2022, 5:26 PM
@calcom/prisma:dx: services.postgres_is_ready.depends_on contains an invalid type, it should be an array
ERROR: "db-up" exited with 1.
a

Agusti

05/11/2022, 5:27 PM
are you changing
in primsa package/.env
DATABASE_URL?
So it’s yours and not the one from docker by default
j

Jimmy Chan

05/11/2022, 5:29 PM
yes i checked
a

Agusti

05/11/2022, 5:30 PM
Sorry but can’t really help much more, could you maybe open an issue with the details and see if someone else from the team knows how to fix it/
j

Jimmy Chan

05/11/2022, 5:31 PM
ok thanks agusti
i even connected to the db using psql so i know its there
p

Peer

05/11/2022, 9:04 PM
maybe @zomars
z

zomars

05/11/2022, 9:13 PM
Are you still having issues @Jimmy Chan ?
j

Jimmy Chan

05/11/2022, 9:15 PM
no more issues
🎉 2
thanks guys
🙏 3
5 Views