diff --git a/deploy/docker/scripts/renew-certificate.sh b/deploy/docker/scripts/renew-certificate.sh index 20a384d0ef..3c8170d3b8 100644 --- a/deploy/docker/scripts/renew-certificate.sh +++ b/deploy/docker/scripts/renew-certificate.sh @@ -9,11 +9,10 @@ if [[ -f /appsmith-stacks/configuration/docker.env ]]; then set +o allexport fi -if [[ -n $CUSTOM_DOMAIN ]]; then - #then run script - local data_path="/appsmith-stacks/data/certificate" - domain="$CUSTOM_DOMAIN" - local rsa_key_size=4096 +if [[ -n $APPSMITH_CUSTOM_DOMAIN ]]; then + data_path="/appsmith-stacks/data/certificate" + domain="$APPSMITH_CUSTOM_DOMAIN" + rsa_key_size=4096 certbot certonly --webroot --webroot-path="$data_path/certbot" \ --register-unsafely-without-email \ @@ -24,4 +23,4 @@ if [[ -n $CUSTOM_DOMAIN ]]; then supervisorctl restart editor else echo 'Custom domain not configured. Cannot enable SSL without a custom domain.' >&2 -fi \ No newline at end of file +fi