mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 02:35:17 +01:00
Make Harbor database configurable
This commit is contained in:
parent
be0b31e5ba
commit
357004fbf1
@ -11,9 +11,9 @@ LDAP_UID=$ldap_uid
|
||||
LDAP_SCOPE=$ldap_scope
|
||||
LDAP_TIMEOUT=$ldap_timeout
|
||||
DATABASE_TYPE=mysql
|
||||
MYSQL_HOST=mysql
|
||||
MYSQL_PORT=3306
|
||||
MYSQL_USR=root
|
||||
MYSQL_HOST=$db_host
|
||||
MYSQL_PORT=$db_port
|
||||
MYSQL_USR=$db_user
|
||||
MYSQL_PWD=$db_password
|
||||
MYSQL_DATABASE=registry
|
||||
REGISTRY_URL=http://registry:5000
|
||||
|
@ -101,6 +101,16 @@ project_creation_restriction = everyone
|
||||
#Determine whether the job service should verify the ssl cert when it connects to a remote registry.
|
||||
#Set this flag to off when the remote registry uses a self-signed or untrusted certificate.
|
||||
verify_remote_cert = on
|
||||
|
||||
#The follow configurations are for Harbor HA mode only
|
||||
|
||||
#the address of the mysql database.
|
||||
db_host = mysql
|
||||
|
||||
#The port of mysql database host
|
||||
db_port = 3306
|
||||
|
||||
#The user name of mysql database
|
||||
db_user = root
|
||||
#************************END INITIAL PROPERTIES************************
|
||||
#############
|
||||
|
||||
|
@ -139,6 +139,9 @@ ldap_uid = rcp.get("configuration", "ldap_uid")
|
||||
ldap_scope = rcp.get("configuration", "ldap_scope")
|
||||
ldap_timeout = rcp.get("configuration", "ldap_timeout")
|
||||
db_password = rcp.get("configuration", "db_password")
|
||||
db_host = rcp.get("configuration", "db_host")
|
||||
db_port = rcp.get("configuration", "db_port")
|
||||
db_user = rcp.get("configuration", "db_user")
|
||||
self_registration = rcp.get("configuration", "self_registration")
|
||||
if protocol == "https":
|
||||
cert_path = rcp.get("configuration", "ssl_cert")
|
||||
@ -210,6 +213,9 @@ render(os.path.join(templates_dir, "adminserver", "env"),
|
||||
ldap_scope=ldap_scope,
|
||||
ldap_timeout=ldap_timeout,
|
||||
db_password=db_password,
|
||||
db_host=db_host,
|
||||
db_port=db_port,
|
||||
db_user=db_user,
|
||||
email_host=email_host,
|
||||
email_port=email_port,
|
||||
email_usr=email_usr,
|
||||
|
Loading…
Reference in New Issue
Block a user