mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-06 02:31:06 +01:00
5f80fe7b8a
Signed-off-by: Qian Deng <dengq@vmware.com>
20 lines
543 B
Python
20 lines
543 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,
|
|
db_password=config_dict['db_password'])
|
|
|
|
def prepare_db_config_dir():
|
|
prepare_config_dir(db_config_dir) |