1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/tandoor_ynh.git synced 2024-09-03 20:35:56 +02:00
This commit is contained in:
Éric Gaspar 2024-07-22 11:04:58 +02:00
parent 377ac775bb
commit d78c239591
7 changed files with 16 additions and 38 deletions

View file

@ -4,10 +4,10 @@ packaging_format = 2
id = "tandoor"
name = "Tandoor"
description.en = "Application for managing and sharing recipes, planning meals, building shopping lists and much much more!"
description.fr = "Gérez et partagez vos recettes, planifiez vos repas, créez vos listes de courses et beaucoup plus encore !"
description.en = "Manage and share recipes, plan meals, build shopping lists"
description.fr = "Gérez et partagez des recettes, planifiez des repas, créez des listes de courses"
version = "1.5.18~ynh1"
version = "1.5.18~ynh2"
maintainers = ["Navan Chauhan"]
@ -21,14 +21,14 @@ code = "https://github.com/TandoorRecipes/recipes"
cpe = "cpe:2.3:a:tandoor:recipes"
[integration]
yunohost = ">= 11.2"
yunohost = ">= 11.2.20"
architectures = "all"
multi_instance = true
ldap = false
sso = false
disk = "50M"
ram.build = "50M"
ram.runtime = "50M"
disk = "1000M"
ram.build = "2000M"
ram.runtime = "1500M"
[install]
[install.domain]

View file

@ -6,8 +6,8 @@
nodejs_version=16
# Used in .env
timezone="$(cat /etc/timezone)"
version=$(ynh_app_upstream_version)
#=================================================
# PERSONAL HELPERS

View file

@ -44,12 +44,6 @@ ynh_backup --src_path="/etc/logrotate.d/$app"
ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf"
ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
#=================================================
# BACKUP VARIOUS FILES
#=================================================
ynh_backup --src_path="/var/log/$app/"
#=================================================
# BACKUP THE PostgreSQL DATABASE
#=================================================

View file

@ -14,14 +14,14 @@ source /usr/share/yunohost/helpers
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Stopping a systemd service..." --time --weight=1
ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
ynh_script_progression --message="Updating NGINX web server configuration..." --time --weight=1
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
ynh_change_url_nginx_config
@ -40,7 +40,7 @@ chown "$app:$app" "$install_dir/.env"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --time --weight=1
ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app/$app.log"
@ -48,4 +48,4 @@ ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Change of URL completed for $app" --time --last
ynh_script_progression --message="Change of URL completed for $app" --last

View file

@ -40,14 +40,8 @@ ynh_script_progression --message="Setting up source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir/source"
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R "$app:www-data" "$install_dir"
chmod 750 "$data_dir"
chmod -R o-rwx "$data_dir"
chown -R "$app:www-data" "$data_dir"
#=================================================
# ADD A CONFIGURATION
#=================================================
@ -58,9 +52,8 @@ ynh_add_config --template="dot_env" --destination="$install_dir/.env"
chmod 400 "$install_dir/.env"
chown "$app:$app" "$install_dir/.env"
version=$(ynh_app_upstream_version)
ynh_add_config --template="version.py" --destination="$install_dir/source/recipes/version.py"
chmod 400 "$install_dir/source/recipes/version.py"
chown "$app:$app" "$install_dir/source/recipes/version.py"

View file

@ -17,8 +17,6 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
ynh_restore_file --origin_path="$install_dir"
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R "$app:www-data" "$install_dir"
#=================================================
@ -28,8 +26,6 @@ ynh_script_progression --message="Restoring the data directory..." --weight=1
ynh_restore_file --origin_path="$data_dir" --not_mandatory
chmod 750 "$data_dir"
chmod -R o-rwx "$data_dir"
chown -R "$app:www-data" "$data_dir"
#=================================================
@ -52,12 +48,6 @@ yunohost service add "$app" --description="Smart recipe management" --log="/var/
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#=================================================
# RESTORE VARIOUS FILES
#=================================================
ynh_restore_file --origin_path="/var/log/$app/"
#=================================================
# GENERIC FINALIZATION
#=================================================

View file

@ -47,9 +47,8 @@ ynh_add_config --template="dot_env" --destination="$install_dir/.env"
chmod 400 "$install_dir/.env"
chown "$app:$app" "$install_dir/.env"
version=$(ynh_app_upstream_version)
ynh_add_config --template="version.py" --destination="$install_dir/source/recipes/version.py"
chmod 400 "$install_dir/source/recipes/version.py"
chown "$app:$app" "$install_dir/source/recipes/version.py"
@ -57,9 +56,11 @@ chown "$app:$app" "$install_dir/source/recipes/version.py"
# SPECIFIC SETUP
#=================================================
ynh_script_progression --message="Building frontend..." --weight=5
_tandoor_build_frontend
ynh_script_progression --message="Installing Tandoor and its python dependencies..." --weight=1
_tandoor_venv_install
ynh_script_progression --message="Running migrations and generating static files..." --weight=2