diff options
| author | syeopite <70992037+syeopite@users.noreply.github.com> | 2021-10-11 12:42:22 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-11 14:42:22 +0200 |
| commit | b10f37bea972fde6586639511bf8eaab490581fd (patch) | |
| tree | 634a8f3664eb6e7417598d9aad81a5206e88c08e /src/invidious.cr | |
| parent | 0947c266122a49e8452e9a3efb978a1e38048868 (diff) | |
| download | invidious-b10f37bea972fde6586639511bf8eaab490581fd.tar.gz invidious-b10f37bea972fde6586639511bf8eaab490581fd.tar.bz2 invidious-b10f37bea972fde6586639511bf8eaab490581fd.zip | |
Use kemal in production mode (#2455)
Diffstat (limited to 'src/invidious.cr')
| -rw-r--r-- | src/invidious.cr | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 9e67e216..73abe6b0 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -1549,4 +1549,11 @@ Kemal.config.logger = LOGGER Kemal.config.host_binding = Kemal.config.host_binding != "0.0.0.0" ? Kemal.config.host_binding : CONFIG.host_binding Kemal.config.port = Kemal.config.port != 3000 ? Kemal.config.port : CONFIG.port Kemal.config.app_name = "Invidious" + +# Use in kemal's production mode. +# Users can also set the KEMAL_ENV environmental variable for this to be set automatically. +{% if flag?(:release) || flag?(:production) %} + Kemal.config.env = "production" if !ENV.has_key?("KEMAL_ENV") +{% end %} + Kemal.run |
