diff --git a/make/common/templates/adminserver/env b/make/common/templates/adminserver/env index 53b6244aa..0bdb92c49 100644 --- a/make/common/templates/adminserver/env +++ b/make/common/templates/adminserver/env @@ -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 diff --git a/make/harbor.cfg b/make/harbor.cfg index 93720ea09..dab57ba2b 100644 --- a/make/harbor.cfg +++ b/make/harbor.cfg @@ -11,6 +11,15 @@ ui_url_protocol = http #The password for the root user of mysql db, change this before any production use. db_password = root123 +#the address of the mysql database. Don't change in standalone model +db_host = mysql + +#The port of mysql database host +db_port = 3306 + +#The user name of mysql database +db_user = root + #Maximum number of job workers in job service max_job_workers = 3 diff --git a/make/prepare b/make/prepare index 7cde72116..c15fc2035 100755 --- a/make/prepare +++ b/make/prepare @@ -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,