1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-19 13:19:41 +02:00

feat: implement the possibility to add tls (#4456)

Signed-off-by: Wim de Groot <34519486+wim-de-groot@users.noreply.github.com>
This commit is contained in:
Wim de Groot 2024-11-04 17:17:08 +01:00 committed by GitHub
parent ff6db2374d
commit 4b9eb5077a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 0 deletions

View file

@ -61,6 +61,15 @@ Changing the webworker settings may cause unforeseen memory leak issues with Mea
| --------------- | :-----: | ----------------------------------------------------------------------------- | | --------------- | :-----: | ----------------------------------------------------------------------------- |
| UVICORN_WORKERS | 1 | Sets the number of workers for the web server. [More info here][unicorn_workers] | | UVICORN_WORKERS | 1 | Sets the number of workers for the web server. [More info here][unicorn_workers] |
### TLS
Use this only when mealie is run without a webserver or reverse proxy.
| Variables | Default | Description |
| -------------------- | :-----: | ------------------------ |
| TLS_CERTIFICATE_PATH | None | File path to Certificate |
| TLS_PRIVATE_KEY_PATH | None | File path to private key |
### LDAP ### LDAP
| Variables | Default | Description | | Variables | Default | Description |

View file

@ -353,6 +353,15 @@ class AppSettings(AppLoggingSettings):
model_config = SettingsConfigDict(arbitrary_types_allowed=True, extra="allow") model_config = SettingsConfigDict(arbitrary_types_allowed=True, extra="allow")
# ===============================================
# TLS
TLS_CERTIFICATE_PATH: str | os.PathLike[str] | None = None
"""Path where the certificate resides."""
TLS_PRIVATE_KEY_PATH: str | os.PathLike[str] | None = None
"""Path where the private key resides."""
def app_settings_constructor(data_dir: Path, production: bool, env_file: Path, env_encoding="utf-8") -> AppSettings: def app_settings_constructor(data_dir: Path, production: bool, env_file: Path, env_encoding="utf-8") -> AppSettings:
""" """

View file

@ -13,6 +13,8 @@ def main():
log_config=log_config(), log_config=log_config(),
workers=settings.WORKERS, workers=settings.WORKERS,
forwarded_allow_ips=settings.HOST_IP, forwarded_allow_ips=settings.HOST_IP,
ssl_keyfile=settings.TLS_PRIVATE_KEY_PATH,
ssl_certfile=settings.TLS_CERTIFICATE_PATH,
) )