1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/fittrackee_ynh.git synced 2024-09-03 18:36:16 +02:00

use .env file

This commit is contained in:
Eric Wagoner 2022-12-29 17:14:40 -05:00
parent 04fa60f102
commit d12f15e4c7
3 changed files with 14 additions and 6 deletions

View file

@ -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

View file

@ -1,5 +1,7 @@
#!/bin/bash
set -a; source __FINALPATH__/.env; set +a
# stop if one process fails
set -e

View file

@ -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"