lensesio / kafka-topics-ui

Web Tool for Kafka Topics |
https://lenses.io
877 stars 148 forks source link

Docker env variable to add custom options to the Caddyfile #102

Closed croeck closed 6 years ago

croeck commented 6 years ago

We were having some issues with the request taking too long if the REST proxy contains large amounts of data, or the topic has many partitions. In those cases, Caddy always terminated the connection and we were given a Gateway timeout 502.

With this new option, one can add custom options to the Caddyfile, for instance to adjust the timeouts to the individual needs.

The options are only applied to the file if the env variable is specified by the user.


This change is Reviewable

andmarios commented 6 years ago

Hey @croeck, thank you for the PR! Really appreciated!

One question before I merge it, I see you always add two times the $CADDY_OPTIONS into Caddyfile (lines 26 and 53 of run.sh) and I think of deleting the first one, keeping only the second ( if [[ -n "${CADDY_OPTIONS}" ]]; then...).

Is there something I miss and should keep both?

croeck commented 6 years ago

Good catch @andmarios, seems I missed that one while transforming from the quick fix to the final solution. I removed it and already updated the pull request.

andmarios commented 6 years ago

Cool, thank you for a perfect PR!

Antwnis commented 6 years ago

Maybe we want the same to be applied to landoop/fast-data-dev as well ? Sounds like a nice thing to have