diff --git a/proxy.json b/proxy.json index 4261dd8..696b56f 100644 --- a/proxy.json +++ b/proxy.json @@ -20,8 +20,21 @@ "COMMENT": "edeg3e98" }, "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", "PROXY_TYPE": "", + "GENERATE_CERTIFICATE": "true", "LETSENCRYPT_URL": "letsencrypt.org", "LETSENCRYPT_SERVICE_NAME": "letsencrypt.json", "CERT_DIR": "/keys", diff --git a/scripts/nginx_config_create.sh b/scripts/nginx_config_create.sh index 60e20d5..4635f7b 100755 --- a/scripts/nginx_config_create.sh +++ b/scripts/nginx_config_create.sh @@ -1,5 +1,7 @@ #!/bin/sh +GENERATE_CERTIFICATE=$GENERATE_CERTIFICATE + cd /proxy_config 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) # check whether certificates exist or not -if [[ "$HTTPS_PORT" != "" ]]; then +if [[ "$HTTPS_PORT" != "" && "$GENERATE_CERTIFICATE" == "true" ]]; then /scripts/check_certificates.sh "$DOMAIN"; fi