mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-24 17:47:46 +01:00
bb66358df8
* Fix migration script 1. port is string when parsed from configparser 2. remove index and db_user in if condition Signed-off-by: Qian Deng <dengq@vmware.com> * Add port to public_url Add port to public_url Signed-off-by: Qian Deng <dengq@vmware.com> * Customized value for notary and clair db config in notary and clair is hardcoded Signed-off-by: Qian Deng <dengq@vmware.com> * Add notary and clair db config in harbor.yml Add notary clair config to harbor.yml and fix related regression Signed-off-by: Qian Deng <dengq@vmware.com>
20 lines
557 B
Python
20 lines
557 B
Python
import os
|
|
|
|
from g import config_dir, templates_dir
|
|
from utils.misc import prepare_config_dir
|
|
from utils.jinja import render_jinja
|
|
|
|
db_config_dir = os.path.join(config_dir, "db")
|
|
db_env_template_path = os.path.join(templates_dir, "db", "env.jinja")
|
|
db_conf_env = os.path.join(config_dir, "db", "env")
|
|
|
|
def prepare_db(config_dict):
|
|
prepare_db_config_dir()
|
|
|
|
render_jinja(
|
|
db_env_template_path,
|
|
db_conf_env,
|
|
harbor_db_password=config_dict['harbor_db_password'])
|
|
|
|
def prepare_db_config_dir():
|
|
prepare_config_dir(db_config_dir) |