Skip to content

Conversation

@BoostCookie
Copy link

Fixes #544

This commit also passes environment values directly (instead of as string) to the settings.py if the value starts with { and ends with }. Trailing whitespace is also allowed.

This allows correctly parsing settings such as

services:
  ...
  zulip:
    ...
    environment:
      ...
      SETTING_SOCIAL_AUTH_SAML_TECHNICAL_CONTACT: |
        {
            "givenName": "Technical team",
            "emailAddress": ZULIP_ADMINISTRATOR,
        }
      DB_HOST: "database"
      ...

which the entrypoint.sh sees as the string

'{
	"givenName": "Technical team",
	"emailAddress": ZULIP_ADMINISTRATOR,
}
'

(Notice the trailing whitespace.)

Without this modification the resulting settings.py looks like

SOCIAL_AUTH_SAML_TECHNICAL_CONTACT = '{
    "givenName": "Technical team",
    "emailAddress": ZULIP_ADMINISTRATOR,
}
'

With this modification it looks like

SOCIAL_AUTH_SAML_TECHNICAL_CONTACT = {
	"givenName": "Technical team",
	"emailAddress": ZULIP_ADMINISTRATOR,
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some settings which should be treated as arrays are treated as strings

1 participant