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

Save 2s of boot time for DISABLE_HTTPS users by removing the need to run `puppet` on each boot

Open timabbott opened this issue 7 years ago • 5 comments

See https://github.com/zulip/docker-zulip/pull/136#discussion_r201022978 for some context; basically, our implementation of the http_only feature slows down the container's startup process.

What we'll want to do is check if the hash of /etc/zulip/zulip.conf has changed since the last time the image booted, and only run puppet if it has. Since it's only a couple seconds of runtime, this is more a performance optimization than a correctness issue.

I did a small tweak to move the zulip-puppet-apply call inside the if statement, so this now only affects users doing the DISABLE_HTTPS option.

This is a somewhat important issue for some new users, but probably lower priority than most of the other issues we have open right now (especially since DISABLE_HTTPS is mostly only used for quick initial testing).

timabbott avatar Jul 10 '18 06:07 timabbott

@timabbott wait, does it mean I can disable HTTPS and work with HTTP instead of HTTPS?

gioragutt avatar Jul 18 '18 16:07 gioragutt

Yes, though we don't recommend it from a security perspective.

timabbott avatar Jul 18 '18 16:07 timabbott

Say I run on a private network, where I don't give a damn about the security part, and the HTTPS means that people end up doing advanced -> proceed in chrome, ignoring the self-signed certificate warning.

Is it easy to do? and if I do it, is it easy to return the the HTTPS configuration?

gioragutt avatar Jul 18 '18 17:07 gioragutt

Yes, it's easy to do and easy to return. If you're running this Docker image off of master in both this repo and the zulip/zulip one, you can just set DISABLE_HTTPS in docker-compose.yml and it'll do HTTP only. (It used to be a more annoying flow to setup).

timabbott avatar Jul 18 '18 18:07 timabbott

trying this out now! Hope it helps me to run behind reverse proxy!

maltokyo avatar Jan 04 '20 00:01 maltokyo