docker-zulip icon indicating copy to clipboard operation
docker-zulip copied to clipboard

How to correctly specify ALLOWED_HOSTS in docker-compose/kube

Open gioragutt opened this issue 7 years ago • 7 comments

Hi, I'm trying to set the ALLOWED_HOSTS env var, and I've tried setting it to:

  • "domain" (we have dns routing for all our pcs, so domain.com becomes domain)
  • "[\"domain\"]"

What is the correct way to specify this setting?

gioragutt avatar Jul 08 '18 14:07 gioragutt

@galexrt do you know the answer for this off the top of your head?

timabbott avatar Jul 10 '18 06:07 timabbott

@gioragutt Write it as ALLOWED_HOSTS: '["domain"]'. It is a "special type" which set automatically set as an array (printed as is), see https://github.com/zulip/docker-zulip/blob/master/entrypoint.sh#L280-L289.

galexrt avatar Jul 10 '18 07:07 galexrt

@galexrt thanks for the help. I think I'll open an issue regarding documentation of maintaining a server running with docker-compose or kubernetes.

As someone who's main work doesn't require to know docker related technologies in great depth, and to anyone alike, documenting the knowledge of how to work with a running server and maintain it without clusterfuking it in 1AM (managed to get it up and running later, but ended up with missing user avatars), would be a tremendous help.

gioragutt avatar Jul 14 '18 07:07 gioragutt

I'm reopening this until we document it properly.

timabbott avatar Jul 25 '18 17:07 timabbott

FYI, SETTING_ALLOWED_HOSTS: '["<host_or_IP>"]' is what is needed nowadays.

ashmckenzie avatar Dec 29 '18 09:12 ashmckenzie

@ashmckenzie had the settings changed in 1.9.0/1.9.1?

gioragutt avatar Dec 29 '18 10:12 gioragutt

I can't say for certain, I just tried setting up a new instance fresh from latest

ashmckenzie avatar Dec 29 '18 10:12 ashmckenzie