diff --git a/conf/.env.production b/conf/.env.production index 156d259..4cf61f5 100644 --- a/conf/.env.production +++ b/conf/.env.production @@ -2,8 +2,8 @@ SECRET_KEY="7(2w1sedok=aznpq)ta1mc4i%4h=xx@hxwx*o57ctsuml0x%fr" # SECURITY WARNING: don 't run with debug turned on in production! -DEBUG=false -USE_HTTPS=true +DEBUG=false +USE_HTTPS=true DOMAIN=__DOMAIN__ @@ -46,8 +46,8 @@ FLOWER_PASSWORD=changeme # Email config EMAIL_HOST=localhost EMAIL_PORT=587 -#EMAIL_HOST_USER=mail@your.domain.here -#EMAIL_HOST_PASSWORD=emailpassword123 +EMAIL_HOST_USER=__ADMIN_MAIL__ +EMAIL_HOST_PASSWORD= EMAIL_USE_TLS=true EMAIL_USE_SSL=false EMAIL_SENDER_NAME=__ADMIN_MAIL__ @@ -113,4 +113,4 @@ OTEL_SERVICE_NAME= # via https. Please refer to the Django-Documentation and assess the risks # for your instance: # https://docs.djangoproject.com/en/3.2/ref/settings/#secure-proxy-ssl-header -HTTP_X_FORWARDED_PROTO=false +HTTP_X_FORWARDED_PROTO=false diff --git a/conf/dockerless-run.sh b/conf/dockerless-run.sh index 55e6e12..7e0aa9e 100644 --- a/conf/dockerless-run.sh +++ b/conf/dockerless-run.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -a; source __FINALPATH__/.env; set +a + # stop if one process fails set -e diff --git a/scripts/install b/scripts/install index 6947c7d..44a94b2 100755 --- a/scripts/install +++ b/scripts/install @@ -119,10 +119,16 @@ touch "/var/log/$app/${app}.log" chown -R $app: "/var/log/$app/" #================================================= -# SCRIPT AND DEP INIT +# CONFIGURE THEN INSTALL SCRIPT AND DEPENDENCIES #================================================= ynh_script_progression --message="Installing service script..." --weight=1 +ynh_add_config --template="../conf/.env.production" --destination="$final_path/.env" +chmod 600 $final_path/.env +chown $app:www-data "$final_path/.env" + +set -a; source "$final_path/.env"; set +a + ynh_add_config --template="dockerless-run.sh" --destination="$final_path/dockerless-run.sh" chmod 700 "$final_path/dockerless-run.sh" chown $app:$app "$final_path/dockerless-run.sh"