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

@ -46,8 +46,8 @@ FLOWER_PASSWORD=changeme
# Email config # Email config
EMAIL_HOST=localhost EMAIL_HOST=localhost
EMAIL_PORT=587 EMAIL_PORT=587
#EMAIL_HOST_USER=mail@your.domain.here EMAIL_HOST_USER=__ADMIN_MAIL__
#EMAIL_HOST_PASSWORD=emailpassword123 EMAIL_HOST_PASSWORD=
EMAIL_USE_TLS=true EMAIL_USE_TLS=true
EMAIL_USE_SSL=false EMAIL_USE_SSL=false
EMAIL_SENDER_NAME=__ADMIN_MAIL__ EMAIL_SENDER_NAME=__ADMIN_MAIL__

View file

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

View file

@ -119,10 +119,16 @@ touch "/var/log/$app/${app}.log"
chown -R $app: "/var/log/$app/" 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_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" ynh_add_config --template="dockerless-run.sh" --destination="$final_path/dockerless-run.sh"
chmod 700 "$final_path/dockerless-run.sh" chmod 700 "$final_path/dockerless-run.sh"
chown $app:$app "$final_path/dockerless-run.sh" chown $app:$app "$final_path/dockerless-run.sh"