diff --git a/Deploy/prepare b/Deploy/prepare index f47bb283e..8b981625f 100755 --- a/Deploy/prepare +++ b/Deploy/prepare @@ -20,78 +20,16 @@ for i in "${arr[@]}"; do fi done -echo "appname = registry -runmode = dev - -[lang] -types = en-US|zh-CN -names = en-US|zh-CN - -[dev] -httpport = 80 - -[mail] -host = $email_server -port = $email_server_port -username = $email_username -password = $email_password -from = $email_from" > $ui_path/app.conf +source $tpl_path/ui/app.conf > $ui_path/app.conf echo "Generated configuration file: "$ui_path/app.conf -echo "MYSQL_HOST=mysql -MYSQL_PORT=3306 -MYSQL_USR=root -MYSQL_PWD=$db_password -REGISTRY_URL=http://registry:5000 -CONFIG_PATH=/etc/ui/app.conf -HARBOR_REG_URL=$hostname -HARBOR_ADMIN_PASSWORD=$harbor_admin_password -HARBOR_URL=$hostname -AUTH_MODE=$auth_mode -LDAP_URL=$ldap_url -LDAP_BASE_DN=$ldap_basedn -SELF_REGISTRATION=$self_registration -LOG_LEVEL=debug" > $ui_path/env +source $tpl_path/ui/env > $ui_path/env echo "Generated configuration file: "$ui_path/env -echo "MYSQL_ROOT_PASSWORD=$db_password" > $config_path/db/env +source $tpl_path/db/env > $config_path/db/env echo "Generated configuration file: "$config_path/db/env -echo "version: 0.1 -log: - level: debug - fields: - service: registry -storage: - cache: - layerinfo: inmemory - filesystem: - rootdirectory: /storage - maintenance: - uploadpurging: - enabled: false - delete: - enabled: true -http: - addr: :5000 - secret: placeholder - debug: - addr: localhost:5001 -auth: - token: - issuer: registry-token-issuer - realm: $ui_url/service/token - rootcertbundle: /etc/registry/root.crt - service: token-service - -notifications: - endpoints: - - name: harbor - disabled: false - url: http://ui/service/notifications - timeout: 500 - threshold: 5 - backoff: 1000" > $config_path/registry/config.yml +source $tpl_path/registry/config.yml > $config_path/registry/config.yml echo "Generated configuration file: "$config_path/registry/config.yml is_fail=0 diff --git a/Deploy/templates/db/env b/Deploy/templates/db/env index 31cb6bdec..80f898590 100644 --- a/Deploy/templates/db/env +++ b/Deploy/templates/db/env @@ -1 +1 @@ -MYSQL_ROOT_PASSWORD=$db_password +echo "MYSQL_ROOT_PASSWORD=$db_password" diff --git a/Deploy/templates/registry/config.yml b/Deploy/templates/registry/config.yml index a1b19a8ed..f588d7c80 100644 --- a/Deploy/templates/registry/config.yml +++ b/Deploy/templates/registry/config.yml @@ -1,4 +1,4 @@ -version: 0.1 +echo "version: 0.1 log: level: debug fields: @@ -32,4 +32,4 @@ notifications: url: http://ui/service/notifications timeout: 500 threshold: 5 - backoff: 1000 + backoff: 1000" diff --git a/Deploy/templates/ui/app.conf b/Deploy/templates/ui/app.conf index 63dbd3451..9119fd651 100644 --- a/Deploy/templates/ui/app.conf +++ b/Deploy/templates/ui/app.conf @@ -1,4 +1,4 @@ -appname = registry +echo "appname = registry runmode = dev [lang] @@ -11,6 +11,6 @@ httpport = 80 [mail] host = $email_server port = $email_server_port -username = $email_user_name -password = $email_user_password -from = $email_from +username = $email_username +password = $email_password +from = $email_from" diff --git a/Deploy/templates/ui/env b/Deploy/templates/ui/env index e20e2bc6d..b38953819 100644 --- a/Deploy/templates/ui/env +++ b/Deploy/templates/ui/env @@ -1,14 +1,14 @@ -MYSQL_HOST=mysql +echo "MYSQL_HOST=mysql MYSQL_PORT=3306 MYSQL_USR=root MYSQL_PWD=$db_password REGISTRY_URL=http://registry:5000 CONFIG_PATH=/etc/ui/app.conf HARBOR_REG_URL=$hostname -HARBOR_ADMIN_PASSWORD=$admin_pwd -HARBOR_URL=$ui_url +HARBOR_ADMIN_PASSWORD=$harbor_admin_password +HARBOR_URL=$hostname AUTH_MODE=$auth_mode LDAP_URL=$ldap_url LDAP_BASE_DN=$ldap_basedn SELF_REGISTRATION=$self_registration -LOG_LEVEL=debug +LOG_LEVEL=debug"