diff --git a/make/photon/prepare/templates/core/app.conf.jinja b/make/photon/prepare/templates/core/app.conf.jinja index 6110364ca..706ca3e3f 100644 --- a/make/photon/prepare/templates/core/app.conf.jinja +++ b/make/photon/prepare/templates/core/app.conf.jinja @@ -1,6 +1,10 @@ appname = Harbor -runmode = dev +runmode = prod enablegzip = true -[dev] -httpport = 8080 +[prod] +{% if internal_tls.enabled %} +httpport = {{8443}} +{% else %} +httpport = {{8080}} +{% endif %} diff --git a/make/photon/prepare/templates/core/env.jinja b/make/photon/prepare/templates/core/env.jinja index 13062a2cd..d4acab9c4 100644 --- a/make/photon/prepare/templates/core/env.jinja +++ b/make/photon/prepare/templates/core/env.jinja @@ -5,7 +5,6 @@ SYNC_QUOTA=true CHART_CACHE_DRIVER={{chart_cache_driver}} _REDIS_URL_REG={{redis_url_reg}} -PORT=8080 LOG_LEVEL={{log_level}} EXT_ENDPOINT={{public_url}} DATABASE_TYPE=postgresql @@ -48,8 +47,11 @@ HTTPS_PROXY={{core_https_proxy}} NO_PROXY={{core_no_proxy}} {%if internal_tls.enabled %} +PORT=8443 INTERNAL_TLS_ENABLED=true INTERNAL_TLS_KEY_PATH=/etc/harbor/ssl/core.key INTERNAL_TLS_CERT_PATH=/etc/harbor/ssl/core.crt INTERNAL_TLS_TRUST_CA_PATH=/harbor_cust_cert/harbor_internal_ca.crt +{% else %} +PORT=8080 {% endif %} \ No newline at end of file diff --git a/make/photon/prepare/utils/core.py b/make/photon/prepare/utils/core.py index 5836cc0be..d803431f2 100644 --- a/make/photon/prepare/utils/core.py +++ b/make/photon/prepare/utils/core.py @@ -39,7 +39,8 @@ def prepare_core(config_dict, with_notary, with_clair, with_trivy, with_chartmus core_conf_template_path, core_conf, uid=DEFAULT_UID, - gid=DEFAULT_GID) + gid=DEFAULT_GID, + **config_dict) def copy_core_config(core_templates_path, core_config_path):