Merge pull request #7326 from ninjadq/default_config_to_https

Set default mode to https
This commit is contained in:
Daniel Jiang 2019-04-22 09:24:39 +08:00 committed by GitHub
commit 71cd51c9f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View File

@ -3,15 +3,19 @@
#The IP address or hostname to access admin UI and registry service.
#DO NOT use localhost or 127.0.0.1, because Harbor needs to be accessed by external clients.
hostname: reg.mydomain.com
# core, harbor
# http related comfig
http:
# port for http, default is 80. If https enabled, this port will redirect to https port
port: 80
# https:
# port: 443
# #The path of cert and key files for nginx
# certificate: /your/certificate/path
# private_key: /your/private/key/path
# https related comfig
https:
# https port for harbor, default is 443
port: 443
#The path of cert and key files for nginx
certificate: /data/cert/server.crt
private_key: /data/cert/server.key
# Uncomment extearnal_url if you want to enable external proxy
# And when it enabled the hostname will no longger used

View File

@ -3,7 +3,3 @@ IP=`ip addr s eth0 |grep "inet "|awk '{print $2}' |awk -F "/" '{print $1}'`
#echo $IP
sudo sed "s/reg.mydomain.com/$IP/" -i make/harbor.yml
echo "https:" >> make/harbor.yml
echo " certificate: /data/cert/server.crt" >> make/harbor.yml
echo " private_key: /data/cert/server.key" >> make/harbor.yml