From b7d543c29453171167c16b77404169c266afa908 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Tue, 28 Feb 2023 21:39:00 +0100 Subject: [PATCH] various fixes --- conf/.env.production | 2 +- conf/fittrackee.service | 2 +- scripts/install | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/conf/.env.production b/conf/.env.production index e8dee93..43ccef1 100644 --- a/conf/.env.production +++ b/conf/.env.production @@ -17,7 +17,7 @@ export DATABASE_URL=postgresql://__DB_USER__:__DB_PWD__@:5432/__DB_NAME__ # export DATABASE_DISABLE_POOLING= # Redis (required for API rate limits and email sending) -# export REDIS_URL= +export REDIS_URL=redis:// # API rate limits # export API_RATE_LIMITS="300 per 5 minutes" diff --git a/conf/fittrackee.service b/conf/fittrackee.service index a6cf608..4cae851 100644 --- a/conf/fittrackee.service +++ b/conf/fittrackee.service @@ -29,7 +29,7 @@ Environment="MAP_ATTRIBUTION=" Environment="WEATHER_API_KEY=" WorkingDirectory=__INSTALL_DIR__/ EnvironmentFile=__INSTALL_DIR__/.env -ExecStart=__INSTALL_DIR__/.venv/bin/gunicorn -b 127.0.0.1:__PORT__ "fittrackee:create_app()" --error-logfile /var/log/$app/$app.log +ExecStart=__INSTALL_DIR__/.venv/bin/gunicorn -b 127.0.0.1:__PORT__ "fittrackee:create_app()" --error-logfile /var/log/__APP__/__APP__.log Restart=always [Install] diff --git a/scripts/install b/scripts/install index a5e043f..990712c 100755 --- a/scripts/install +++ b/scripts/install @@ -36,6 +36,9 @@ ynh_script_progression --message="Setting up source files..." --weight=64 mkdir -p "$install_dir" +# Set permissions to app files +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" pushd $install_dir mkdir -p .venv