mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-25 18:18:04 +01:00
d3ab9d7c6b
add related file, config, command to enabled https for portal Signed-off-by: DQ <dengq@vmware.com>
19 lines
642 B
Python
19 lines
642 B
Python
from g import config_dir, DEFAULT_GID, DEFAULT_UID, templates_dir
|
|
from utils.misc import prepare_dir
|
|
from utils.jinja import render_jinja
|
|
|
|
portal_config_dir = config_dir.joinpath("portal")
|
|
portal_conf_template_path = templates_dir.joinpath("portal", "nginx.conf.jinja")
|
|
portal_conf = config_dir.joinpath("portal", "nginx.conf")
|
|
|
|
def prepare_portal(config_dict):
|
|
prepare_dir(portal_config_dir, uid=DEFAULT_UID, gid=DEFAULT_GID)
|
|
|
|
# Render Jobservice config
|
|
render_jinja(
|
|
str(portal_conf_template_path),
|
|
portal_conf,
|
|
internal_tls=config_dict['internal_tls'],
|
|
uid=DEFAULT_UID,
|
|
gid=DEFAULT_GID)
|