From 3a54a4d4b83c22940ca976799898ca99f8687c6c Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sun, 3 Sep 2023 15:15:14 +0200 Subject: [PATCH 01/30] add email --- conf/.env.production | 6 +++--- manifest.toml | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/conf/.env.production b/conf/.env.production index 1765397..797a773 100644 --- a/conf/.env.production +++ b/conf/.env.production @@ -23,9 +23,9 @@ REDIS_URL=redis:// # API_RATE_LIMITS="300 per 5 minutes" # Emails -# UI_URL=__DOMAIN__ -# EMAIL_URL= -# SENDER_EMAIL= +UI_URL=__DOMAIN__ +EMAIL_URL=smtp://__APP__:__MAIL_PWD__@127.0.0.1:25 +SENDER_EMAIL=__APP__@__DOMAIN__ # WORKERS_PROCESSES= # Workouts diff --git a/manifest.toml b/manifest.toml index 9d3a986..149ad42 100644 --- a/manifest.toml +++ b/manifest.toml @@ -63,6 +63,7 @@ ram.runtime = "50M" [resources] [resources.system_user] + allow_email = true [resources.install_dir] From 023e38af24eec30716596b225e86085b20ce47ff Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 4 Sep 2023 08:57:15 +0200 Subject: [PATCH 02/30] Update .env.production --- conf/.env.production | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/.env.production b/conf/.env.production index 797a773..ea9fa1e 100644 --- a/conf/.env.production +++ b/conf/.env.production @@ -24,7 +24,7 @@ REDIS_URL=redis:// # Emails UI_URL=__DOMAIN__ -EMAIL_URL=smtp://__APP__:__MAIL_PWD__@127.0.0.1:25 +EMAIL_URL=smtp://__APP__:__MAIL_PWD__@__DOMAIN__:587/?tls=True SENDER_EMAIL=__APP__@__DOMAIN__ # WORKERS_PROCESSES= From ed10c510b1b2fb96abf9771887b9ec2830c41587 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 4 Sep 2023 16:13:56 +0200 Subject: [PATCH 03/30] Update .env.production --- conf/.env.production | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/.env.production b/conf/.env.production index ea9fa1e..5990646 100644 --- a/conf/.env.production +++ b/conf/.env.production @@ -24,8 +24,8 @@ REDIS_URL=redis:// # Emails UI_URL=__DOMAIN__ -EMAIL_URL=smtp://__APP__:__MAIL_PWD__@__DOMAIN__:587/?tls=True -SENDER_EMAIL=__APP__@__DOMAIN__ +EMAIL_URL=smtp://__ADMIN__:__PASSWORD__@__MAIN_DOMAIN__:587/?tls=True +SENDER_EMAIL=__ADMIN__@__MAIN_DOMAIN__ # WORKERS_PROCESSES= # Workouts From 15d00cef4995997e389f2195134568ab5cf03a6c Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 4 Sep 2023 16:57:10 +0200 Subject: [PATCH 04/30] Update install --- scripts/install | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/install b/scripts/install index b82298b..abc2a10 100755 --- a/scripts/install +++ b/scripts/install @@ -12,6 +12,9 @@ source /usr/share/yunohost/helpers admin=$(ynh_user_get_info --username=$admin --key=username) admin_mail=$(ynh_user_get_info --username=$admin --key=mail) +// Retrieve YunoHost main domain +$main_domain = exec('cat /etc/yunohost/current_host'); + #================================================= # LOGROTATE ynh_script_progression --message="Configuring logrotate to manage application logfiles" --weight=1 From 912088bffc3884f9132aa361a0dab20241921098 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 4 Sep 2023 17:33:13 +0200 Subject: [PATCH 05/30] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index abc2a10..7aa253b 100755 --- a/scripts/install +++ b/scripts/install @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers admin=$(ynh_user_get_info --username=$admin --key=username) admin_mail=$(ynh_user_get_info --username=$admin --key=mail) -// Retrieve YunoHost main domain +# Retrieve YunoHost main domain $main_domain = exec('cat /etc/yunohost/current_host'); #================================================= From 08ce7bdb243a548c929d4a7913b72c3c0aeeb5d3 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 4 Sep 2023 17:53:14 +0200 Subject: [PATCH 06/30] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 7aa253b..3183095 100755 --- a/scripts/install +++ b/scripts/install @@ -13,7 +13,7 @@ admin=$(ynh_user_get_info --username=$admin --key=username) admin_mail=$(ynh_user_get_info --username=$admin --key=mail) # Retrieve YunoHost main domain -$main_domain = exec('cat /etc/yunohost/current_host'); +main_domain=$(cat /etc/yunohost/current_host) #================================================= # LOGROTATE From ca3c8fd77355f05323d7e3850c38dd390a0a14d0 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 4 Sep 2023 19:26:59 +0200 Subject: [PATCH 07/30] Update .env.production --- conf/.env.production | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/.env.production b/conf/.env.production index 5990646..839494e 100644 --- a/conf/.env.production +++ b/conf/.env.production @@ -24,8 +24,8 @@ REDIS_URL=redis:// # Emails UI_URL=__DOMAIN__ -EMAIL_URL=smtp://__ADMIN__:__PASSWORD__@__MAIN_DOMAIN__:587/?tls=True -SENDER_EMAIL=__ADMIN__@__MAIN_DOMAIN__ +EMAIL_URL=smtp://__ADMIN__:__PASSWORD__@__MDOMAIN__:587/?tls=True +SENDER_EMAIL=__ADMIN__@__DOMAIN__ # WORKERS_PROCESSES= # Workouts From c5ebde400b611ac43d0a679d2acd2ee42b4faed1 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 4 Sep 2023 19:27:17 +0200 Subject: [PATCH 08/30] Update .env.production --- conf/.env.production | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/.env.production b/conf/.env.production index 839494e..3a5a23d 100644 --- a/conf/.env.production +++ b/conf/.env.production @@ -24,7 +24,7 @@ REDIS_URL=redis:// # Emails UI_URL=__DOMAIN__ -EMAIL_URL=smtp://__ADMIN__:__PASSWORD__@__MDOMAIN__:587/?tls=True +EMAIL_URL=smtp://__ADMIN__:__PASSWORD__@__DOMAIN__:587/?tls=True SENDER_EMAIL=__ADMIN__@__DOMAIN__ # WORKERS_PROCESSES= From aa3a43bcbc9f2b61409b9233a37b9019821456b0 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 4 Sep 2023 19:37:52 +0200 Subject: [PATCH 09/30] Update .env.production --- conf/.env.production | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/.env.production b/conf/.env.production index 3a5a23d..8f7ff71 100644 --- a/conf/.env.production +++ b/conf/.env.production @@ -24,8 +24,8 @@ REDIS_URL=redis:// # Emails UI_URL=__DOMAIN__ -EMAIL_URL=smtp://__ADMIN__:__PASSWORD__@__DOMAIN__:587/?tls=True -SENDER_EMAIL=__ADMIN__@__DOMAIN__ +EMAIL_URL=smtp://__APP__:__MAIL_PWD__@__MAIN_DOMAIN__:587/?tls=True +SENDER_EMAIL=__APP__@__MAIN_DOMAIN__ # WORKERS_PROCESSES= # Workouts From 22567ec8bf0185ba9fefc412465bdc217f0d16a3 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 4 Sep 2023 20:06:23 +0200 Subject: [PATCH 10/30] Update upgrade --- scripts/upgrade | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 4cfe6f1..054866d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -16,6 +16,9 @@ source /usr/share/yunohost/helpers admin=$(ynh_user_get_info --username=$admin --key=username) admin_mail=$(ynh_user_get_info --username=$admin --key=mail) +# Retrieve YunoHost main domain +main_domain=$(cat /etc/yunohost/current_host) + #================================================= # CHECK VERSION #================================================= From 9c8347672fd0b523fe567b86e935a06713fa4d2e Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 4 Sep 2023 20:14:01 +0200 Subject: [PATCH 11/30] fix logs --- conf/fittrackee.service | 2 +- scripts/install | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/fittrackee.service b/conf/fittrackee.service index 205b26c..5cab9e3 100644 --- a/conf/fittrackee.service +++ b/conf/fittrackee.service @@ -29,7 +29,7 @@ Environment="STATICMAP_SUBDOMAINS=" Environment="MAP_ATTRIBUTION=" Environment="WEATHER_API_KEY=" WorkingDirectory=__INSTALL_DIR__/ -ExecStart=__INSTALL_DIR__/venv/bin/gunicorn -b 127.0.0.1:__PORT__ "fittrackee:create_app()" --error-logfile /var/log/__APP__/gunicorn.log +ExecStart=__INSTALL_DIR__/venv/bin/gunicorn -b 127.0.0.1:__PORT__ "fittrackee:create_app()" --error-logfile /var/log/__APP__/__APP__.log diff --git a/scripts/install b/scripts/install index 3183095..7a65281 100755 --- a/scripts/install +++ b/scripts/install @@ -107,7 +107,7 @@ ynh_add_systemd_config --service="${app}_workers" --template="fittrackee_workers # INTEGRATE SERVICE IN YUNOHOST ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add "${app}" --description="Fittrackee main service" --log="/var/log/$app/$app.log" --log="/var/log/$app/gunicorn.log" +yunohost service add "${app}" --description="Fittrackee main service" --log="/var/log/$app/$app.log" yunohost service add "${app}_workers" --description="Fittrackee task queue service" --log="var/log/$app/${app}_workers.log" diff --git a/scripts/upgrade b/scripts/upgrade index 054866d..ced38d6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -120,7 +120,7 @@ ynh_add_systemd_config --service="${app}_workers" --template="fittrackee_workers #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add "${app}" --description="Fittrackee main service" --log="/var/log/$app/$app.log" --log="/var/log/$app/gunicorn.log" +yunohost service add "${app}" --description="Fittrackee main service" --log="/var/log/$app/$app.log" yunohost service add "${app}_workers" --description="Fittrackee task queue service" --log="var/log/$app/${app}_workers.log" #================================================= From d4b1f5b5b854bb1fd28d989a86a44120d8744b77 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 4 Sep 2023 20:14:34 +0200 Subject: [PATCH 12/30] fix logs --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 458f492..be9370f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -67,7 +67,7 @@ systemctl enable "${app}_workers.service" --quiet #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add "${app}" --description="Fittrackee main service" --log="/var/log/$app/$app.log" --log="/var/log/$app/gunicorn.log" +yunohost service add "${app}" --description="Fittrackee main service" --log="/var/log/$app/$app.log" yunohost service add "${app}_workers" --description="Fittrackee task queue service" --log="var/log/$app/${app}_workers.log" #================================================= From 1865f2f4967936b5b6449106418387f3ad46036a Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Tue, 5 Sep 2023 08:39:35 +0200 Subject: [PATCH 13/30] Update .env.production --- conf/.env.production | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/.env.production b/conf/.env.production index 8f7ff71..5990646 100644 --- a/conf/.env.production +++ b/conf/.env.production @@ -24,8 +24,8 @@ REDIS_URL=redis:// # Emails UI_URL=__DOMAIN__ -EMAIL_URL=smtp://__APP__:__MAIL_PWD__@__MAIN_DOMAIN__:587/?tls=True -SENDER_EMAIL=__APP__@__MAIN_DOMAIN__ +EMAIL_URL=smtp://__ADMIN__:__PASSWORD__@__MAIN_DOMAIN__:587/?tls=True +SENDER_EMAIL=__ADMIN__@__MAIN_DOMAIN__ # WORKERS_PROCESSES= # Workouts From f8b40179a514f8621232c099627c27f0028b7467 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Tue, 5 Sep 2023 13:53:50 +0200 Subject: [PATCH 14/30] refactor to use config_panel --- conf/.env.production | 4 ++-- config_panel.toml | 24 ++++++++++++++++++++++++ scripts/install | 6 +++--- scripts/upgrade | 3 --- 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/conf/.env.production b/conf/.env.production index 5990646..1d9dca1 100644 --- a/conf/.env.production +++ b/conf/.env.production @@ -24,8 +24,8 @@ REDIS_URL=redis:// # Emails UI_URL=__DOMAIN__ -EMAIL_URL=smtp://__ADMIN__:__PASSWORD__@__MAIN_DOMAIN__:587/?tls=True -SENDER_EMAIL=__ADMIN__@__MAIN_DOMAIN__ +EMAIL_URL=smtp://__USER_MAIL__:__MAIL_PASSWORD__@__MAIL_DOMAIN__:587/?tls=True +SENDER_EMAIL=__USER_MAIL__@__MAIL_DOMAIN__ # WORKERS_PROCESSES= # Workouts diff --git a/config_panel.toml b/config_panel.toml index b9ad4bc..11fef63 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -44,4 +44,28 @@ services = ["__APP__", "__APP___workers"] help.fr = "Insérer la clé api donnée par le fournisseur météo choisi" bind = "WEATHER_API_KEY:/var/www/__APP__/.env" + [main.config.USER_MAIL] + ask.en = "Configure the user mail" + ask.fr = "Configurer le courriel utilisateur" + type = "string" + bind = "USER_MAIL:/var/www/__APP__/.env" + + [main.config.MAIL_PASSWORD] + ask.en = "Configure the password of the determined mail user" + ask.fr = "Configurer le mot de passe de l’utilisateur mail choisi" + type = "string" + bind = "MAIL_PASSWORD:/var/www/__APP__/.env" + + [main.config.MAIL_DOMAIN] + ask.en = "Configure the server address" + ask.fr = "Configurer l’adresse du serveur" + type = "string" + help.en = "e.g. mydomain.com" + help.fr = "ex. : mondomain.com" + bind = "MAIL_DOMAIN:/var/www/__APP__/.env" + + + + + \ No newline at end of file diff --git a/scripts/install b/scripts/install index 7a65281..b64e986 100755 --- a/scripts/install +++ b/scripts/install @@ -11,9 +11,9 @@ source /usr/share/yunohost/helpers admin=$(ynh_user_get_info --username=$admin --key=username) admin_mail=$(ynh_user_get_info --username=$admin --key=mail) - -# Retrieve YunoHost main domain -main_domain=$(cat /etc/yunohost/current_host) +user_mail=$($app) +mail_password=$($mail_pwd) +mail_domain=$($domain) #================================================= # LOGROTATE diff --git a/scripts/upgrade b/scripts/upgrade index ced38d6..c4b7b25 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -16,9 +16,6 @@ source /usr/share/yunohost/helpers admin=$(ynh_user_get_info --username=$admin --key=username) admin_mail=$(ynh_user_get_info --username=$admin --key=mail) -# Retrieve YunoHost main domain -main_domain=$(cat /etc/yunohost/current_host) - #================================================= # CHECK VERSION #================================================= From c773210b6a2f7a1ecbe1338f33ddd6b4e8584bc7 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Tue, 5 Sep 2023 14:07:45 +0200 Subject: [PATCH 15/30] fix --- scripts/upgrade | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index c4b7b25..795355e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,6 +15,10 @@ source /usr/share/yunohost/helpers admin=$(ynh_user_get_info --username=$admin --key=username) admin_mail=$(ynh_user_get_info --username=$admin --key=mail) +user_mail=$($app) +mail_password=$($mail_pwd) +mail_domain=$($domain) + #================================================= # CHECK VERSION From f3227345957484ec7913f476597273b300c7e43c Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Tue, 5 Sep 2023 14:20:19 +0200 Subject: [PATCH 16/30] Update upgrade --- scripts/upgrade | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 795355e..b2f3985 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,9 +15,9 @@ source /usr/share/yunohost/helpers admin=$(ynh_user_get_info --username=$admin --key=username) admin_mail=$(ynh_user_get_info --username=$admin --key=mail) -user_mail=$($app) -mail_password=$($mail_pwd) -mail_domain=$($domain) +user_mail=$app +mail_password=$mail_pwd +mail_domain=$domain #================================================= From fb9b0d4f8767e4f566c7d509110e5acc88c03d7e Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Tue, 5 Sep 2023 14:26:02 +0200 Subject: [PATCH 17/30] Update install --- scripts/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index b64e986..a4325c3 100755 --- a/scripts/install +++ b/scripts/install @@ -11,9 +11,9 @@ source /usr/share/yunohost/helpers admin=$(ynh_user_get_info --username=$admin --key=username) admin_mail=$(ynh_user_get_info --username=$admin --key=mail) -user_mail=$($app) -mail_password=$($mail_pwd) -mail_domain=$($domain) +user_mail=$app +mail_password=$mail_pwd +mail_domain=$domain #================================================= # LOGROTATE From 75de3654f966b181dd5a57832b66f8c8b60dae98 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Tue, 5 Sep 2023 14:33:02 +0200 Subject: [PATCH 18/30] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index b2f3985..08a91c4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers admin=$(ynh_user_get_info --username=$admin --key=username) admin_mail=$(ynh_user_get_info --username=$admin --key=mail) -user_mail=$app +mail_user=$app mail_password=$mail_pwd mail_domain=$domain From 26ebe4fc58e8fa7636c9c42ff13307e79f394210 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Tue, 5 Sep 2023 14:33:23 +0200 Subject: [PATCH 19/30] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index a4325c3..22fb4b2 100755 --- a/scripts/install +++ b/scripts/install @@ -11,7 +11,7 @@ source /usr/share/yunohost/helpers admin=$(ynh_user_get_info --username=$admin --key=username) admin_mail=$(ynh_user_get_info --username=$admin --key=mail) -user_mail=$app +mail_user=$app mail_password=$mail_pwd mail_domain=$domain From 64c9c08ab144e2e6a88206afb49b75c9d7b71cb1 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Tue, 5 Sep 2023 14:34:24 +0200 Subject: [PATCH 20/30] Update config_panel.toml --- config_panel.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index 11fef63..e60e868 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -44,11 +44,11 @@ services = ["__APP__", "__APP___workers"] help.fr = "Insérer la clé api donnée par le fournisseur météo choisi" bind = "WEATHER_API_KEY:/var/www/__APP__/.env" - [main.config.USER_MAIL] + [main.config.mail_user] ask.en = "Configure the user mail" ask.fr = "Configurer le courriel utilisateur" type = "string" - bind = "USER_MAIL:/var/www/__APP__/.env" + bind = "MAIL_USER:/var/www/__APP__/.env" [main.config.MAIL_PASSWORD] ask.en = "Configure the password of the determined mail user" @@ -68,4 +68,4 @@ services = ["__APP__", "__APP___workers"] - \ No newline at end of file + From 1aabe77158b5545ed5f4d2bda86757a04c595d0c Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Tue, 5 Sep 2023 14:35:02 +0200 Subject: [PATCH 21/30] Update .env.production --- conf/.env.production | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/.env.production b/conf/.env.production index 1d9dca1..4d62c30 100644 --- a/conf/.env.production +++ b/conf/.env.production @@ -24,8 +24,8 @@ REDIS_URL=redis:// # Emails UI_URL=__DOMAIN__ -EMAIL_URL=smtp://__USER_MAIL__:__MAIL_PASSWORD__@__MAIL_DOMAIN__:587/?tls=True -SENDER_EMAIL=__USER_MAIL__@__MAIL_DOMAIN__ +EMAIL_URL=smtp://__MAIL_USER__:__MAIL_PASSWORD__@__MAIL_DOMAIN__:587/?tls=True +SENDER_EMAIL=__MAIL_USER__@__MAIL_DOMAIN__ # WORKERS_PROCESSES= # Workouts From 288552b74714c4bf1365018712116816b1b2397d Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Tue, 5 Sep 2023 14:48:24 +0200 Subject: [PATCH 22/30] Update install --- scripts/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 22fb4b2..b4b4cf1 100755 --- a/scripts/install +++ b/scripts/install @@ -11,9 +11,9 @@ source /usr/share/yunohost/helpers admin=$(ynh_user_get_info --username=$admin --key=username) admin_mail=$(ynh_user_get_info --username=$admin --key=mail) -mail_user=$app -mail_password=$mail_pwd -mail_domain=$domain +mail_user="$app" +mail_password="$mail_pwd" +mail_domain="$domain" #================================================= # LOGROTATE From 32c65d50d3f6e97f2501f6825bac22e0d960bd44 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Tue, 5 Sep 2023 14:49:04 +0200 Subject: [PATCH 23/30] Update upgrade --- scripts/upgrade | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 08a91c4..008df5d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,9 +15,9 @@ source /usr/share/yunohost/helpers admin=$(ynh_user_get_info --username=$admin --key=username) admin_mail=$(ynh_user_get_info --username=$admin --key=mail) -mail_user=$app -mail_password=$mail_pwd -mail_domain=$domain +mail_user="$app" +mail_password="$mail_pwd" +mail_domain="$domain" #================================================= From 924fbec70c04a3f57ad31f854ece7ebc0a62074a Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Tue, 5 Sep 2023 19:26:59 +0200 Subject: [PATCH 24/30] test --- conf/.env.production | 4 ++-- config_panel.toml | 24 +----------------------- 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/conf/.env.production b/conf/.env.production index 4d62c30..90d6176 100644 --- a/conf/.env.production +++ b/conf/.env.production @@ -24,8 +24,8 @@ REDIS_URL=redis:// # Emails UI_URL=__DOMAIN__ -EMAIL_URL=smtp://__MAIL_USER__:__MAIL_PASSWORD__@__MAIL_DOMAIN__:587/?tls=True -SENDER_EMAIL=__MAIL_USER__@__MAIL_DOMAIN__ +EMAIL_URL=smtp://__APP__:__MAIL_PWD__@__DOMAIN__:465/?ssl=True +SENDER_EMAIL=__APP__@__DOMAIN__ # WORKERS_PROCESSES= # Workouts diff --git a/config_panel.toml b/config_panel.toml index e60e868..75e9748 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -44,28 +44,6 @@ services = ["__APP__", "__APP___workers"] help.fr = "Insérer la clé api donnée par le fournisseur météo choisi" bind = "WEATHER_API_KEY:/var/www/__APP__/.env" - [main.config.mail_user] - ask.en = "Configure the user mail" - ask.fr = "Configurer le courriel utilisateur" - type = "string" - bind = "MAIL_USER:/var/www/__APP__/.env" - - [main.config.MAIL_PASSWORD] - ask.en = "Configure the password of the determined mail user" - ask.fr = "Configurer le mot de passe de l’utilisateur mail choisi" - type = "string" - bind = "MAIL_PASSWORD:/var/www/__APP__/.env" - - [main.config.MAIL_DOMAIN] - ask.en = "Configure the server address" - ask.fr = "Configurer l’adresse du serveur" - type = "string" - help.en = "e.g. mydomain.com" - help.fr = "ex. : mondomain.com" - bind = "MAIL_DOMAIN:/var/www/__APP__/.env" - - - - + From 515cf3e378792cd187cdc224798e933ae50e8c39 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Tue, 5 Sep 2023 20:51:09 +0200 Subject: [PATCH 25/30] fix --- scripts/install | 3 --- scripts/upgrade | 4 ---- 2 files changed, 7 deletions(-) diff --git a/scripts/install b/scripts/install index b4b4cf1..a900e26 100755 --- a/scripts/install +++ b/scripts/install @@ -11,9 +11,6 @@ source /usr/share/yunohost/helpers admin=$(ynh_user_get_info --username=$admin --key=username) admin_mail=$(ynh_user_get_info --username=$admin --key=mail) -mail_user="$app" -mail_password="$mail_pwd" -mail_domain="$domain" #================================================= # LOGROTATE diff --git a/scripts/upgrade b/scripts/upgrade index 008df5d..c4b7b25 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,10 +15,6 @@ source /usr/share/yunohost/helpers admin=$(ynh_user_get_info --username=$admin --key=username) admin_mail=$(ynh_user_get_info --username=$admin --key=mail) -mail_user="$app" -mail_password="$mail_pwd" -mail_domain="$domain" - #================================================= # CHECK VERSION From c9a576d15e7c90332b98ce8bcf88acf515b337ba Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Tue, 5 Sep 2023 20:52:12 +0200 Subject: [PATCH 26/30] revert to 587 --- conf/.env.production | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/.env.production b/conf/.env.production index 90d6176..ea9fa1e 100644 --- a/conf/.env.production +++ b/conf/.env.production @@ -24,7 +24,7 @@ REDIS_URL=redis:// # Emails UI_URL=__DOMAIN__ -EMAIL_URL=smtp://__APP__:__MAIL_PWD__@__DOMAIN__:465/?ssl=True +EMAIL_URL=smtp://__APP__:__MAIL_PWD__@__DOMAIN__:587/?tls=True SENDER_EMAIL=__APP__@__DOMAIN__ # WORKERS_PROCESSES= From 42f0a476bc85a523c075ef38bb10b4cba1a474b9 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Fri, 15 Sep 2023 20:25:51 +0200 Subject: [PATCH 27/30] add config --- config_panel.toml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/config_panel.toml b/config_panel.toml index 75e9748..00f6e9d 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -44,6 +44,20 @@ services = ["__APP__", "__APP___workers"] help.fr = "Insérer la clé api donnée par le fournisseur météo choisi" bind = "WEATHER_API_KEY:/var/www/__APP__/.env" + [main.config.email_url] + ask.en = "Change SMTP mail address" + ask.fr = "Changer l’adresse courriel SMTP" + type = "string" + help.en = "Has to be like this: smtp://username:password@example.com:587/?tls=True" + help.fr = "Doit avoir la forme suivante : smtp://username:password@example.com:587/?tls=True" + bind = "email_url:/var/www/__APP__/.env" + + [main.config.sender_email] + ask.en = "Change sender email" + ask.fr = "Changer l’adresse courriel d’envoi" + type = "email" + bind = "sender_email:/var/www/__APP__/.env" + From 701435941b6e3cf6e92b43fe39b5aca7ac4dc2eb Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Tue, 10 Oct 2023 13:55:52 +0200 Subject: [PATCH 28/30] Update config_panel.toml --- config_panel.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index 00f6e9d..3f93a3d 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -48,8 +48,8 @@ services = ["__APP__", "__APP___workers"] ask.en = "Change SMTP mail address" ask.fr = "Changer l’adresse courriel SMTP" type = "string" - help.en = "Has to be like this: smtp://username:password@example.com:587/?tls=True" - help.fr = "Doit avoir la forme suivante : smtp://username:password@example.com:587/?tls=True" + help.en = "Has to be like this: smtp://username:password@example.com:587/?tls=True. /!\ Please backup your original credentials for the case you want to reset it. " + help.fr = "Doit avoir la forme suivante : smtp://username:password@example.com:587/?tls=True. /!\ Veuillez sauvegarder vos coordonnées initiales au cas où vous voudriez les réinitialiser." bind = "email_url:/var/www/__APP__/.env" [main.config.sender_email] From ab6ce58ff2164c7b2ea877ab38aa38646852e4bd Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 10 Oct 2023 11:55:57 +0000 Subject: [PATCH 29/30] Auto-update README --- README.md | 1 - README_fr.md | 1 - 2 files changed, 2 deletions(-) diff --git a/README.md b/README.md index b784d67..410f3aa 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,6 @@ No mobile app has been developed yet, but several existing mobile apps can store * Official app website: * Official admin documentation: * Upstream app code repository: -* YunoHost documentation for this app: * Report a bug: ## Developer info diff --git a/README_fr.md b/README_fr.md index 3797282..74d6ce1 100644 --- a/README_fr.md +++ b/README_fr.md @@ -30,7 +30,6 @@ Aucune application mobile n'a encore été développée, mais plusieurs applicat * Site officiel de l’app : * Documentation officielle de l’admin : * Dépôt de code officiel de l’app : -* Documentation YunoHost pour cette app : * Signaler un bug : ## Informations pour les développeurs From 1d8fef0a326cdd218d7b8b1530d233b004315e6e Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Tue, 10 Oct 2023 13:57:34 +0200 Subject: [PATCH 30/30] Fix formatting issue --- config_panel.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index 3f93a3d..738ab0a 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -48,8 +48,8 @@ services = ["__APP__", "__APP___workers"] ask.en = "Change SMTP mail address" ask.fr = "Changer l’adresse courriel SMTP" type = "string" - help.en = "Has to be like this: smtp://username:password@example.com:587/?tls=True. /!\ Please backup your original credentials for the case you want to reset it. " - help.fr = "Doit avoir la forme suivante : smtp://username:password@example.com:587/?tls=True. /!\ Veuillez sauvegarder vos coordonnées initiales au cas où vous voudriez les réinitialiser." + help.en = "Has to be like this: smtp://username:password@example.com:587/?tls=True. ❗ Please backup your original credentials for the case you want to reset it. " + help.fr = "Doit avoir la forme suivante : smtp://username:password@example.com:587/?tls=True. ❗ Veuillez sauvegarder vos coordonnées initiales au cas où vous voudriez les réinitialiser." bind = "email_url:/var/www/__APP__/.env" [main.config.sender_email]