Added GENERATE_CERTIFICATE variable and check and updated the proxy.json list also

This commit is contained in:
2022-10-21 13:22:12 +00:00
parent acd5903fd1
commit a19a5c63a7
2 changed files with 16 additions and 1 deletions

View File

@@ -20,8 +20,21 @@
"COMMENT": "edeg3e98" "COMMENT": "edeg3e98"
}, },
"proxy_scheduler": { "proxy_scheduler": {
"DOCKER_REGISTRY_URL": "registry.format.hu",
"CERT_DIR": "/keys",
"DOMAIN_DIR": "/domains",
"PROXY_SERVICE_FILE": "public-proxy.json",
"PROXY_CONFIG_DIR": "/proxy_config",
"PROXY_TYPE": "haproxy",
"TIMEOUT": "5",
"RESTART": "3",
"ROLE": "backend-proxy",
"SERVICE_NAME": "public-proxy"
},
"proxy_scheduler_local": {
"DOCKER_REGISTRY_URL": "registry.format.hu", "DOCKER_REGISTRY_URL": "registry.format.hu",
"PROXY_TYPE": "", "PROXY_TYPE": "",
"GENERATE_CERTIFICATE": "true",
"LETSENCRYPT_URL": "letsencrypt.org", "LETSENCRYPT_URL": "letsencrypt.org",
"LETSENCRYPT_SERVICE_NAME": "letsencrypt.json", "LETSENCRYPT_SERVICE_NAME": "letsencrypt.json",
"CERT_DIR": "/keys", "CERT_DIR": "/keys",

View File

@@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
GENERATE_CERTIFICATE=$GENERATE_CERTIFICATE
cd /proxy_config cd /proxy_config
DOMAIN=$1 DOMAIN=$1
@@ -25,7 +27,7 @@ ALLOWED_NETWORK=$(jq -r '.ALLOWED_NETWORK | select(.!="null") | join(" ")' $DOMA
ALTERNATE_LOCATION_PATH=$(jq -r .ALTERNATE_LOCATION_PATH $DOMAIN_SOURCE) ALTERNATE_LOCATION_PATH=$(jq -r .ALTERNATE_LOCATION_PATH $DOMAIN_SOURCE)
# check whether certificates exist or not # check whether certificates exist or not
if [[ "$HTTPS_PORT" != "" ]]; then if [[ "$HTTPS_PORT" != "" && "$GENERATE_CERTIFICATE" == "true" ]]; then
/scripts/check_certificates.sh "$DOMAIN"; /scripts/check_certificates.sh "$DOMAIN";
fi fi