This doesn’t work using docker-compose and changing just GRIST_SINGLE_ORG variable. Maybe because I have also other variables set?
Do you have an example? I don’t find the API documentation for posting to /api/orgs here:
These are the relevant variables I have set:
APP_DOC_URL=https://docs.grist.example.com
APP_HOME_URL=https://docs.grist.example.com
GRIST_SAML_SP_HOST=https://docs.grist.example.com
GRIST_DOMAIN=grist.example.com
GRIST_ORG_IN_PATH=false
#GRIST_SINGLE_ORG=team2
I have enabled GRIST_SINGLE_ORG=team1 … team2… and did a docker-compose up … down. Accessing team1… team2.grist.example.com doesn’t worked.
Edit:
Also found the solution!! For all others:
Create an API in your users preferences, then run this API request:
curl -s -X POST -H "Content-Type: application/json" -d '{"name": "Team 1", "domain": "team1"}' -H "Authorization: Bearer <your api key>" https://docs.grist.example.com/api/orgs
Replace name and domain with your prefered name. Use a valid syntax for domain (eg. no spaces). Then you can access the team site with https://team1.grist.example.com
. When you do a GET to /api/orgs
, owner is nil
and thats ok, because owner of the team is set from the API key you use.