Use kemal in production mode

This commit is contained in:
syeopite 2021-10-04 00:43:13 -07:00
parent 347c189f3f
commit a5f1564f88
No known key found for this signature in database
GPG Key ID: 6FA616E5A5294A82

View File

@ -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