Commit d7618a62 authored by DQ's avatar DQ
Browse files

Fix: beego app config port hardcode



the port should be flexible depend on the internal tls
Signed-off-by: default avatarDQ <dengq@vmware.com>
parent a11c2f32
appname = Harbor
runmode = dev
runmode = prod
enablegzip = true
[dev]
httpport = 8080
[prod]
{% if internal_tls.enabled %}
httpport = {{8443}}
{% else %}
httpport = {{8080}}
{% endif %}
......@@ -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
......@@ -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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment