docker
docker copied to clipboard
Configuring Single Sign-On
I've followed the Build and Run Cal.com instructions and everything appears to be working apart from the SSO configuration page at /settings/security/sso
, this displays:
Single Sign-On
saml_description
⚠️ unexpected character at line 1 column 1 of the JSON data
I suspect this is because according to the SSO setup instructions an additional database is needed, is there a suggested method for adding an additional database to the PostgreSQL Docker container other than doing it manually?
Have you managed to figure this out? :)
Not yet, I've been working on other things, I guess manually creating the database is the way to solve this?
In kubernetes we use "init containers" for this type of thing, which is something I'm also migrating to in our org's calcom setup.
Check this out and see if it works for your case here: https://stackoverflow.com/questions/70322031/does-docker-compose-support-init-container You can probably create a busybox or other instance which connects to postgres and runs the create command, then make the calcom service dependent on it's completion.
None of these options sound ideal, since the PostgreSQL Docker container is designed to provide one database what about adding an additional PostgreSQL Docker container for the SSO database via the docker-compose.yaml
file, would that be a easier option?
I don't know a whole lot about the SSO setup in particular, but that's fairly common in these cases. Just keep an eye out for port conflicts.
Worth noting, if someone is trying to use it with managed database server, that they still may need to run scripts for the database creation. In which case the init container approach could still be relevant.
Does anyone have working docker-compose for cal.com with SSO? :)
you can create an additional DB easily by using psql
psql -h localhost -U unicorn_user
then in that prompt you can just type
create database calenso_saml
Then in your docker compose file
SAML_DATABASE_URL=postgresql://$${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DATABASE_HOST}/${POSTGRES_DB}_saml
[email protected],[email protected]
But it's still not working for me
Ah no it does! But the feature is behind a paywall... Sad..
...
Then in your docker compose file
SAML_DATABASE_URL=postgresql://$${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DATABASE_HOST}/${POSTGRES_DB}_saml [email protected],[email protected]
...
For anyone else who copy/pasted the environment variables provided by @andres-asm, remove the extra $ before {POSTGRES_USER}
Is this really a enterprise feature? That's a pity, I would have liked to use cal.com.