Any ideas on using Portainer to deploy <http://Cal...
# docker
e
Any ideas on using Portainer to deploy Cal.com? I've managed to get a stack up and running, but when I try to access it I get a 502 page. Wondering if I need to: 1. Do the git clone https://github.com/calcom/cal.com.git first? 2. Have anything else changed in the Docker Compose file? Tip for using Portainer's env function - In the Docker Compose config, use stack.env, instead of pointing it the Docker folder. Removes the error highlighting the .env file doesn't exist. I'm using this Docker Compose file FYI: https://github.com/calcom/docker/blob/main/docker-compose.yaml
I'm getting this error when trying to use Docker Compose to spin up the instance as well, so I' really not sure where I'm going wrong? 🤷🏽‍♂️
Any ideas @Colin - Krumware?
Dug into the docker logs and found:
Copy code
2023-01-23T10:01:14.406798540Z @calcom/web:start:     stack: 'FetchError: invalid json response body at <http://192.53.174.43:3000/api/auth/session> reason: Unexpected token I in JSON at position 0\n' +
2023-01-23T10:01:14.406816841Z @calcom/web:start:       '    at /calcom/node_modules/next/dist/compiled/node-fetch/index.js:1:51220\n' +
2023-01-23T10:01:14.406834361Z @calcom/web:start:       '    at processTicksAndRejections (node:internal/process/task_queues:96:5)',
2023-01-23T10:01:14.406872362Z @calcom/web:start:     name: 'FetchError'
2023-01-23T10:01:14.406889762Z @calcom/web:start:   },
2023-01-23T10:01:14.406907033Z @calcom/web:start:   url: '<http://localhost:3000/api/auth/session>',
2023-01-23T10:01:14.406951624Z @calcom/web:start:   message: 'invalid json response body at <http://localhost:3000/api/auth/session> reason: Unexpected token I in JSON at position 0'
2023-01-23T10:01:14.406970894Z @calcom/web:start: }

I've changed the IP to localhost above to share the log FYI
c
Do you have anything in the encryption key or google auth fields that are just blanked out by your screenshot? can't tell if they're empty or blacked out
e
Yep, copied the full JSON as instructed (blanked for sharing)...😊
Alright, just checked and the JSON that I originally had for the Google Auth was incomplete for some reason. Changed it to the full JSON from Google and....IT WORKS! 🥳 Honestly spent hours trying to debug and fix that... Thank you (again) for your magic. @Colin - Krumware - If I could just get the info on how to make sure the host IP doesn't show, and rather it shows the domain I have, I think I'm on to a winner...🙏🏽
c
you really should just be able to update the webappurl, and it should just work
unless portainer is caching the storage in the instance, it should pull a fresh image and URL replacement should happen during startup
you can check the logs for the replacement
e
Ah, so change NEXT_PUBLIC_WEBAPP_URL and should be all groovy?
I haven't got as far as changing that and trying it with Portainer yet because of the JSON issue, but will give it a try tomorrow...
Appreciate it 🙏🏽😁
That's worked too...thanks v much!
c
awesome, glad to hear it!