From 7fa5e43d08a7aee414ea7fa74497663a8b52ff24 Mon Sep 17 00:00:00 2001 From: Denis Arh Date: Mon, 21 Feb 2022 13:45:11 +0100 Subject: [PATCH] Add HTTP_SERVER_ASSETS_PATH option Fix description for AUTH_ASSETS_PATH --- .env.example | 8 +++++++- app/options/HTTPServer.cue | 7 +++++++ app/options/auth.cue | 1 - pkg/options/options.gen.go | 1 + 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index 5c6d0e0f7..f6f36e905 100644 --- a/.env.example +++ b/.env.example @@ -170,6 +170,13 @@ # Default: # HTTP_SSL_TERMINATED= +############################################################################### +# Corteza will directly serve these assets (static files). +# When empty path is set (default value), embedded files are used. +# Type: string +# Default: +# HTTP_SERVER_ASSETS_PATH= + ############################################################################### # Enable web console. When running in dev environment, web console is enabled by default. # Type: bool @@ -565,7 +572,6 @@ # Path to js, css, images and template source files # # When corteza starts, if path exists it tries to load template files from it. -# If not it uses statically embedded files. # # When empty path is set (default value), embedded files are used. # Type: string diff --git a/app/options/HTTPServer.cue b/app/options/HTTPServer.cue index 386ad9a18..8ca1f769a 100644 --- a/app/options/HTTPServer.cue +++ b/app/options/HTTPServer.cue @@ -120,6 +120,13 @@ HTTPServer: schema.#optionsGroup & { env: "HTTP_SSL_TERMINATED" } + assets_path: { + description: """ + Corteza will directly serve these assets (static files). + When empty path is set (default value), embedded files are used. + """ + } + web_console_enabled: { type: "bool" defaultGoExpr: "false" diff --git a/app/options/auth.cue b/app/options/auth.cue index fdb845398..a861679fb 100644 --- a/app/options/auth.cue +++ b/app/options/auth.cue @@ -185,7 +185,6 @@ auth: schema.#optionsGroup & { Path to js, css, images and template source files When corteza starts, if path exists it tries to load template files from it. - If not it uses statically embedded files. When empty path is set (default value), embedded files are used. """ diff --git a/pkg/options/options.gen.go b/pkg/options/options.gen.go index 22711ceb1..f6b957ab7 100644 --- a/pkg/options/options.gen.go +++ b/pkg/options/options.gen.go @@ -43,6 +43,7 @@ type ( WebappBaseDir string `env:"HTTP_WEBAPP_BASE_DIR"` WebappList string `env:"HTTP_WEBAPP_LIST"` SslTerminated bool `env:"HTTP_SSL_TERMINATED"` + AssetsPath string `env:"HTTP_SERVER_ASSETS_PATH"` WebConsoleEnabled bool `env:"HTTP_SERVER_WEB_CONSOLE_ENABLED"` WebConsoleUsername string `env:"HTTP_SERVER_WEB_CONSOLE_USERNAME"` WebConsolePassword string `env:"HTTP_SERVER_WEB_CONSOLE_PASSWORD"`