From 271abda5e8ab714e805d0cdfda0e237b06d8fee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 30 Apr 2023 12:19:19 +0200 Subject: [PATCH 001/218] Update install --- scripts/install | 118 ------------------------------------------------ 1 file changed, 118 deletions(-) diff --git a/scripts/install b/scripts/install index d164e57..9a4b5e3 100644 --- a/scripts/install +++ b/scripts/install @@ -9,130 +9,14 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# RETRIEVE ARGUMENTS FROM THE MANIFEST -#================================================= - -domain=$YNH_APP_ARG_DOMAIN -path_url=$YNH_APP_ARG_PATH -is_public=$YNH_APP_ARG_IS_PUBLIC -language=$YNH_APP_ARG_LANGUAGE -admin=$YNH_APP_ARG_ADMIN -password=$YNH_APP_ARG_PASSWORD - -media_upload_size=$YNH_APP_ARG_MEDIA_UPLOAD_SIZE - -### If it's a multi-instance app, meaning it can be installed several times independently -### The id of the app as stated in the manifest is available as $YNH_APP_ID -### The instance number is available as $YNH_APP_INSTANCE_NUMBER (equals "1", "2"...) -### The app instance name is available as $YNH_APP_INSTANCE_NAME -### - the first time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample -### - the second time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample__2 -### - ynhexample__{N} for the subsequent installations, with N=3,4... -### The app instance name is probably what interests you most, since this is -### guaranteed to be unique. This is a good unique identifier to define installation path, -### db names... -app=$YNH_APP_INSTANCE_NAME - -#================================================= -# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS -#================================================= -### About --weight and --time -### ynh_script_progression will show to your final users the progression of each scripts. -### In order to do that, --weight will represent the relative time of execution compared to the other steps in the script. -### --time is a packager option, it will show you the execution time since the previous call. -### This option is implied when running in CI_package_check, you can manually add it if you are manually testing the app. -### Use the execution time displayed in the CI report or by adding --time to the command, to estimate the weight of a step. -### A common way to do it is to set a weight equal to the execution time in second +1. -### The execution time is given for the durationt since the previous call. So the weight should be applied to this previous call. -ynh_script_progression --message="Validating installation parameters..." --weight=1 - -### If the app uses NGINX as web server (written in HTML/PHP in most cases), the final path should be "/var/www/$app". -### If the app provides an internal web server (or uses another application server such as uWSGI), the final path should be "/opt/yunohost/$app" -test ! -e "$install_dir" || ynh_die --message="This path already contains a folder" - -# Register (book) web path -ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url - -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= -ynh_script_progression --message="Storing installation settings..." --weight=1 - -ynh_app_setting_set --app=$app --key=domain --value=$domain -ynh_app_setting_set --app=$app --key=path --value=$path_url -ynh_app_setting_set --app=$app --key=language --value=$language -ynh_app_setting_set --app=$app --key=admin --value=$admin -ynh_app_setting_set --app=$app --key=media_upload_size --value=$media_upload_size - -#================================================= -# STANDARD MODIFICATIONS -#================================================= -# FIND AND OPEN A PORT -#================================================= -ynh_script_progression --message="Finding an available port..." --weight=1 - -### Use these lines if you have to open a port for the application -### `ynh_find_port` will find the first available port starting from the given port. -### If you're not using these lines: -### - Remove the section "CLOSE A PORT" in the remove script - -# Find an available port -port=$(ynh_find_port --port=8095) -ynh_app_setting_set --app=$app --key=port --value=$port - -# Optional: Expose this port publicly -# (N.B.: you only need to do this if the app actually needs to expose the port publicly. -# If you do this and the app doesn't actually need you are CREATING SECURITY HOLES IN THE SERVER !) - -# Open the port -# ynh_script_progression --message="Configuring firewall..." --weight=1 -# ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port - -#================================================= -# INSTALL DEPENDENCIES -#================================================= -ynh_script_progression --message="Installing dependencies..." --weight=1 - -ynh_install_app_dependencies $pkg_dependencies - -# ynh_script_progression --message="Installing extra dependencies…" --weight=1 - -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Configuring system user..." --weight=1 - -# Create a system user -ynh_system_user_create --username=$app --home_dir="$install_dir" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= ynh_script_progression --message="Setting up source files..." --weight=1 -### `ynh_setup_source` is used to install an app from a zip or tar.gz file, -### downloaded from an upstream source, like a git repository. -### `ynh_setup_source` use the file conf/app.src - -ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" -# FIXME: this should be managed by the core in the future -# Here, as a packager, you may have to tweak the ownerhsip/permissions -# such that the appropriate users (e.g. maybe www-data) can access -# files in some cases. -# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder - -# this will be treated as a security issue. -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -141,8 +25,6 @@ chown -R $app:www-data "$install_dir" #================================================= ynh_script_progression --message="Configuring NGINX web server..." --weight=1 -### `ynh_add_nginx_config` will use the file conf/nginx.conf - # Create a dedicated NGINX config ynh_add_nginx_config From 9898a630599d17da46fa644556199b6b75e58ae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 30 Apr 2023 12:21:29 +0200 Subject: [PATCH 002/218] cleaning --- conf/nginx.conf | 2 +- scripts/install | 59 ++----------------------------------------------- 2 files changed, 3 insertions(+), 58 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 9782b91..7937e6b 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,7 +2,7 @@ location __PATH__/ { # Path to source - alias __FINALPATH__/; + alias __INSTALL_DIR__/; # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; diff --git a/scripts/install b/scripts/install index 9a4b5e3..0478f81 100644 --- a/scripts/install +++ b/scripts/install @@ -62,6 +62,7 @@ UPLOAD_LIMIT="${media_upload_size:0:2}000000" # convert the MB argument in bytes #================================================= # Configure the release #================================================= + ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc mix deps.get --only prod ynh_exec_warn_less just js-deps-get @@ -74,6 +75,7 @@ ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc mix release #================================================= # Run the release #================================================= + release_folder="$install_dir/_build/prod/rel/bonfire/" # Database created before, let's run the migrations @@ -82,63 +84,6 @@ ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$release_folder/bin/bonfire e # start bonfire as a daemon ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$release_folder/bin/bonfire start daemon" -#================================================= -# GENERIC FINALIZATION -#================================================= -# SETUP LOGROTATE -#================================================= -ynh_script_progression --message="Configuring log rotation..." --weight=1 - -### `ynh_use_logrotate` is used to configure a logrotate configuration for the logs of this app. -### Use this helper only if there is effectively a log file for this app. -### If you're not using this helper: -### - Remove the section "BACKUP LOGROTATE" in the backup script -### - Remove also the section "REMOVE LOGROTATE CONFIGURATION" in the remove script -### - As well as the section "RESTORE THE LOGROTATE CONFIGURATION" in the restore script -### - And the section "SETUP LOGROTATE" in the upgrade script - -# Use logrotate to manage application logfile(s) -ynh_use_logrotate - -#================================================= -# SETUP FAIL2BAN -#================================================= -ynh_script_progression --message="Configuring Fail2Ban..." --weight=1 - -# Create a dedicated Fail2Ban config -ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login" - -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Configuring permissions..." --weight=1 - -# Make app public if necessary -if [ $is_public -eq 1 ] -then - # Everyone can access the app. - # The "main" permission is automatically created before the install script. - ynh_permission_update --permission="main" --add="visitors" -fi - -### N.B. : the following extra permissions only make sense if your app -### does have for example an admin interface or an API. - -# Only the admin can access the admin panel of the app (if the app has an admin panel) -ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin - -# Everyone can access the API part -# We don't want to display the tile in the SSO so we put --show_tile="false" -# And we don't want the YunoHost admin to be able to remove visitors group to this permission, so we put --protected="true" -ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --show_tile="false" --protected="true" - -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= From 8ad4f53d417d6c937ea9a64e4941594dc46aee1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 30 Apr 2023 12:24:32 +0200 Subject: [PATCH 003/218] Update remove --- scripts/remove | 106 ------------------------------------------------- 1 file changed, 106 deletions(-) diff --git a/scripts/remove b/scripts/remove index f4c45c6..1ceb10e 100644 --- a/scripts/remove +++ b/scripts/remove @@ -9,21 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 - -app=$YNH_APP_INSTANCE_NAME - -domain=$(ynh_app_setting_get --app=$app --key=domain) -port=$(ynh_app_setting_get --app=$app --key=port) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) - - #================================================= # REMOVE DEDICATED USER #================================================= @@ -32,44 +17,6 @@ ynh_script_progression --message="Stop Bonfire..." --weight=1 # start bonfire as a daemon "$release_folder/bin/bonfire stop" -#================================================= -# STANDARD REMOVE -#================================================= -# REMOVE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Removing logrotate configuration..." --weight=1 - -# Remove the app-specific logrotate config -ynh_remove_logrotate - - -#================================================= -# REMOVE THE POSTGRESQL DATABASE -#================================================= -ynh_script_progression --message="Removing the PostgreSQL database..." --weight=1 - -# Remove a database if it exists, along with the associated user -ynh_psql_remove_db --db_user=$db_user --db_name=$db_name - -#================================================= -# REMOVE APP MAIN DIR -#================================================= -ynh_script_progression --message="Removing app main directory..." --weight=1 - -# Remove the app directory securely -ynh_secure_remove --file="$final_path" - -#================================================= -# REMOVE DATA DIR -#================================================= - -# Remove the data directory if --purge option is used -if [ "${YNH_APP_PURGE:-0}" -eq 1 ] -then - ynh_script_progression --message="Removing app data directory..." --weight=1 - ynh_secure_remove --file="$datadir" -fi - #================================================= # REMOVE NGINX CONFIGURATION #================================================= @@ -78,59 +25,6 @@ ynh_script_progression --message="Removing NGINX web server configuration..." -- # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=1 - -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - -#================================================= -# CLOSE A PORT -#================================================= - -if yunohost firewall list | grep -q "\- $port$" -then - ynh_script_progression --message="Closing port $port..." --weight=1 - ynh_exec_warn_less yunohost firewall disallow TCP $port -fi - -#================================================= -# REMOVE FAIL2BAN CONFIGURATION -#================================================= -ynh_script_progression --message="Removing Fail2Ban configuration..." --weight=1 - -# Remove the dedicated Fail2Ban config -ynh_remove_fail2ban_config - -#================================================= -# SPECIFIC REMOVE -#================================================= -# REMOVE VARIOUS FILES -#================================================= -ynh_script_progression --message="Removing various files..." --weight=1 - -# Remove a cron file -ynh_secure_remove --file="/etc/cron.d/$app" - -# Remove a directory securely -ynh_secure_remove --file="/etc/$app" - -# Remove the log files -ynh_secure_remove --file="/var/log/$app" - -#================================================= -# GENERIC FINALIZATION -#================================================= -# REMOVE DEDICATED USER -#================================================= - -ynh_script_progression --message="Removing the dedicated system user..." --weight=1 - -# Delete a system user -ynh_system_user_delete --username=$app - #================================================= # END OF SCRIPT #================================================= From 2fa20d36cb459755204e9e5e14857bbdad195b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 30 Apr 2023 12:25:21 +0200 Subject: [PATCH 004/218] Update manifest.toml --- manifest.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index e012d2e..83180e2 100644 --- a/manifest.toml +++ b/manifest.toml @@ -85,7 +85,9 @@ ram.runtime = "500M" sha256 = "0c1b78f153c67e3b56f91a72a013e854bd87a03fbacdf3846ed1ab10a5d21a0f" [resources.ports] - + + [resources.system_user] + [resources.install_dir] [resources.permissions] From 6bc79816cab48f6e31a99a88f152d5f7c26f7f90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 30 Apr 2023 12:26:15 +0200 Subject: [PATCH 005/218] Create DESCRIPTION.md --- doc/DESCRIPTION.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 doc/DESCRIPTION.md diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..e69de29 From f200a07fd00e34b000adb41645f57fda56945e1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 30 Apr 2023 12:28:09 +0200 Subject: [PATCH 006/218] Update manifest.toml --- manifest.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 83180e2..afeb9ad 100644 --- a/manifest.toml +++ b/manifest.toml @@ -30,8 +30,6 @@ ram.runtime = "500M" [install] [install.domain] type = "domain" - ask.en = "The domain name to use. Bonfire will be installed at its root path (/). This can't be changed." - ask.fr = "Nom de domaine à utiliser. Bonfire sera installé à sa racine (/). Cela ne pourra pas être changé." [install.is_public] type = "boolean" From 6a37065f2cf57af44c55959540a1ece348148e16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 30 Apr 2023 12:30:24 +0200 Subject: [PATCH 007/218] Create backup --- scripts/backup | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 scripts/backup diff --git a/scripts/backup b/scripts/backup new file mode 100644 index 0000000..69055c4 --- /dev/null +++ b/scripts/backup @@ -0,0 +1,41 @@ +#!/bin/bash + +#================================================= +# GENERIC START +#================================================= +# IMPORT GENERIC HELPERS +#================================================= + +# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts +source ../settings/scripts/_common.sh +source /usr/share/yunohost/helpers + +#================================================= +# DECLARE DATA AND CONF FILES TO BACKUP +#================================================= +ynh_print_info --message="Declaring files to be backed up..." + +#================================================= +# BACKUP THE APP MAIN DIR +#================================================= + +ynh_backup --src_path="$install_dir" + +#================================================= +# BACKUP THE NGINX CONFIGURATION +#================================================= + +ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" + +#================================================= +# BACKUP THE POSTGRESQL DATABASE +#================================================= +ynh_print_info --message="Backing up the PostgreSQL database..." + +ynh_psql_dump_db --database="$db_name" > db.sql + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." From 167748b2c865c14ebf2c822e7d86489b15eeb270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 30 Apr 2023 12:33:38 +0200 Subject: [PATCH 008/218] fix --- scripts/change_url | 23 ++++++++++++++++++++ scripts/restore | 51 ++++++++++++++++++++++++++++++++++++++++++++ scripts/upgrade | 53 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 127 insertions(+) create mode 100644 scripts/change_url create mode 100644 scripts/restore create mode 100644 scripts/upgrade diff --git a/scripts/change_url b/scripts/change_url new file mode 100644 index 0000000..4ba8cf7 --- /dev/null +++ b/scripts/change_url @@ -0,0 +1,23 @@ +#!/bin/bash + +#================================================= +# GENERIC STARTING +#================================================= +# IMPORT GENERIC HELPERS +#================================================= + +source _common.sh +source /usr/share/yunohost/helpers + +#================================================= +# MODIFY URL IN NGINX CONF +#================================================= +ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 + +ynh_change_url_nginx_config + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_script_progression --message="Change of URL completed for $app" --last diff --git a/scripts/restore b/scripts/restore new file mode 100644 index 0000000..f489d88 --- /dev/null +++ b/scripts/restore @@ -0,0 +1,51 @@ +#!/bin/bash + +#================================================= +# GENERIC START +#================================================= +# IMPORT GENERIC HELPERS +#================================================= + +# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts +source ../settings/scripts/_common.sh +source /usr/share/yunohost/helpers + +#================================================= +# RESTORE THE APP MAIN DIR +#================================================= +ynh_script_progression --message="Restoring the app main directory..." --weight=1 + +ynh_restore_file --origin_path="$install_dir" + +chown -R $app:www-data "$install_dir" + +#================================================= +# RESTORE THE POSTGRESQL DATABASE +#================================================= +ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=1 + +ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql + +#================================================= +# RESTORE SYSTEM CONFIGURATIONS +#================================================= +# RESTORE THE PHP-FPM CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + +#================================================= +# GENERIC FINALIZATION +#================================================= +# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE +#================================================= +ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 + +ynh_systemd_action --service_name=nginx --action=reload + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_script_progression --message="Restoration completed for $app" --last diff --git a/scripts/upgrade b/scripts/upgrade new file mode 100644 index 0000000..e31fa34 --- /dev/null +++ b/scripts/upgrade @@ -0,0 +1,53 @@ +#!/bin/bash + +#================================================= +# GENERIC START +#================================================= +# IMPORT GENERIC HELPERS +#================================================= + +source _common.sh +source /usr/share/yunohost/helpers + +upgrade_type=$(ynh_check_app_version_changed) + +#================================================= +# "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...) +#================================================= +# DOWNLOAD, CHECK AND UNPACK SOURCE +#================================================= + +if [ "$upgrade_type" == "UPGRADE_APP" ] +then + ynh_script_progression --message="Upgrading source files..." --weight=1 + + # Download, check integrity, uncompress and patch the source from app.src + ynh_setup_source --dest_dir="$install_dir" +fi + +chown -R $app:www-data "$install_dir" + +#================================================= +# REAPPLY SYSTEM CONFIGURATIONS +#================================================= +ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 + +ynh_add_nginx_config + +#================================================= +# RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...) +#================================================= +# UPDATE A CONFIG FILE +#================================================= +#ynh_script_progression --message="Updating a configuration file..." --weight=1 + +#ynh_add_config --template="some_config_file" --destination="$install_dir/some_config_file" + +#chmod 400 "$install_dir/some_config_file" +#chown $app:$app "$install_dir/some_config_file" + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_script_progression --message="Upgrade of $app completed" --last From 8f0f2fde8290cd77a92c1282c40ee7489270710b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 30 Apr 2023 15:10:42 +0200 Subject: [PATCH 009/218] fix --- conf/.env | 3 +++ scripts/install | 10 ++++++++++ 2 files changed, 13 insertions(+) create mode 100644 conf/.env diff --git a/conf/.env b/conf/.env new file mode 100644 index 0000000..04f60c3 --- /dev/null +++ b/conf/.env @@ -0,0 +1,3 @@ +MIX_ENV=prod +FLAVOUR=classic +HOSTNAME=__DOMAIN__ \ No newline at end of file diff --git a/scripts/install b/scripts/install index 0478f81..d04f539 100644 --- a/scripts/install +++ b/scripts/install @@ -59,6 +59,16 @@ ynh_replace_string --match_string="PUBLIC_PORT=4000" --replace_string="PUBLIC_PO # max file upload size UPLOAD_LIMIT="${media_upload_size:0:2}000000" # convert the MB argument in bytes +#================================================= +# ADD A CONFIGURATION +#================================================= +ynh_script_progression --message="Adding a configuration file..." --weight=1 + +ynh_add_config --template="../conf/.env" --destination="$install_dir/.env" + +chmod 400 "$install_dir/.env" +chown $app:$app "$install_dir/.env" + #================================================= # Configure the release #================================================= From e55316dbea1d70346c8f597ff7dae97fdd0d710d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 30 Apr 2023 15:21:49 +0200 Subject: [PATCH 010/218] add .env --- conf/.env | 16 +++++++++++++++- scripts/install | 43 ++++++++++++------------------------------- 2 files changed, 27 insertions(+), 32 deletions(-) diff --git a/conf/.env b/conf/.env index 04f60c3..b472618 100644 --- a/conf/.env +++ b/conf/.env @@ -1,3 +1,17 @@ MIX_ENV=prod FLAVOUR=classic -HOSTNAME=__DOMAIN__ \ No newline at end of file +HOSTNAME=__DOMAIN__ + +SECRET_KEY_BASE=__SECRET_KEY_BASE__ +SIGNING_SALT=__SIGNING_SALT__ +ENCRYPTION_SALT=__ENCRYPTION_SALT__ + +SERVER_PORT=__PORT__ +PUBLIC_PORT=443 + +# TODO : Configure S3 - with proper Yunohost question during installation +#UPLOADS_S3_BUCKET= +#UPLOADS_S3_ACCESS_KEY_ID= +#UPLOADS_S3_SECRET_ACCESS_KEY= + +#UPLOAD_LIMIT= \ No newline at end of file diff --git a/scripts/install b/scripts/install index d04f539..0c3689f 100644 --- a/scripts/install +++ b/scripts/install @@ -9,6 +9,10 @@ source _common.sh source /usr/share/yunohost/helpers +secret_key_base=$(ynh_string_random --length=24) +signing_salt=$(ynh_string_random --length=24) +encryption_salt=$(ynh_string_random --length=24) + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -28,37 +32,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# SPECIFIC SETUP -#================================================= -# Configuration files -#================================================= - -config="$install_dir/.config" -env_file="$install_dir/.env" - -export MIX_ENV=prod FLAVOUR=classic - -ynh_exec_warn_less just config -# generate secrets -ynh_replace_string --match_string="SECRET_KEY_BASE=you-should-put-a-secure-string-here" --replace_string="SECRET_KEY_BASE=$(openssl rand -base64 128)" --target_file="$env_file" -ynh_replace_string --match_string="SIGNING_SALT=you-should-put-a-different-secure-string-here" --replace_string="SIGNING_SALT=$(openssl rand -base64 128)" --target_file="$env_file" -ynh_replace_string --match_string="ENCRYPTION_SALT=you-should-put-yet-another-secure-string-here" --replace_string="ENCRYPTION_SALT=$(openssl rand -base64 128)" --target_file="$env_file" - -# Configure server ports -ynh_replace_string --match_string="HOSTNAME=localhost" --replace_string="HOSTNAME=$domain" --target_file="$env_file" -# TODO : mail service ? -ynh_replace_string --match_string="SERVER_PORT=4000" --replace_string="SERVER_PORT^=$port" --target_file="$env_file" -ynh_replace_string --match_string="PUBLIC_PORT=4000" --replace_string="PUBLIC_PORT=443" --target_file="$env_file" - -# TODO : Configure S3 - with proper Yunohost question during installation -# UPLOADS_S3_BUCKET= -# UPLOADS_S3_ACCESS_KEY_ID= -# UPLOADS_S3_SECRET_ACCESS_KEY= - -# max file upload size -UPLOAD_LIMIT="${media_upload_size:0:2}000000" # convert the MB argument in bytes - #================================================= # ADD A CONFIGURATION #================================================= @@ -69,6 +42,14 @@ ynh_add_config --template="../conf/.env" --destination="$install_dir/.env" chmod 400 "$install_dir/.env" chown $app:$app "$install_dir/.env" +#================================================= +# SPECIFIC SETUP +#================================================= +# Configuration files +#================================================= + +ynh_exec_warn_less just config + #================================================= # Configure the release #================================================= From f6d514fb17a6bad6ad6c25f96f9b1f64b590b003 Mon Sep 17 00:00:00 2001 From: lapineige Date: Mon, 1 May 2023 10:50:07 +0200 Subject: [PATCH 011/218] ask -> help --- manifest.toml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/manifest.toml b/manifest.toml index afeb9ad..17b5892 100644 --- a/manifest.toml +++ b/manifest.toml @@ -30,6 +30,8 @@ ram.runtime = "500M" [install] [install.domain] type = "domain" + help.en = "The domain name to use. Bonfire will be installed at its root path (/). This can't be changed." + help.fr = "Nom de domaine à utiliser. Bonfire sera installé à sa racine (/). Cela ne pourra pas être changé." [install.is_public] type = "boolean" @@ -42,8 +44,8 @@ ram.runtime = "500M" default = "visitors" [install.language] - ask.en = "Choose the application language" - ask.fr = "Choisissez la langue de l'application" + help.en = "Choose the application language" + help.fr = "Choisissez la langue de l'application" type = "string" choices = ["fr", "en"] default = "fr" @@ -71,8 +73,8 @@ ram.runtime = "500M" "150MB" ] default = "20MB" - ask.en = "Maximum size of the media uploaded. Can be changed later." - ask.fr = "Taille maximale des médias mis en ligne. Peut-être modifié ultérieurement." + help.en = "Maximum size of the media uploaded. Can be changed later." + help.fr = "Taille maximale des médias mis en ligne. Peut-être modifié ultérieurement." [resources] From 8f631739557849c239dae9602af22b9191478047 Mon Sep 17 00:00:00 2001 From: lapineige Date: Mon, 1 May 2023 17:52:00 +0200 Subject: [PATCH 012/218] Install just --- scripts/install | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/install b/scripts/install index 0c3689f..016ad94 100644 --- a/scripts/install +++ b/scripts/install @@ -48,6 +48,15 @@ chown $app:$app "$install_dir/.env" # Configuration files #================================================= +### Add just dependancy +# TODO : this is unsafe and should be dealt with in a better way. +# There is currently no proper way to install it simply on Debian 11 https://github.com/casey/just#packages + +git clone 'https://mpr.makedeb.org/just' +cd just +makedeb -si +cd .. + ynh_exec_warn_less just config #================================================= From 1f3b7bd1a5c8671412d1d564f94551ece96b1d27 Mon Sep 17 00:00:00 2001 From: lapineige Date: Mon, 1 May 2023 17:59:48 +0200 Subject: [PATCH 013/218] add makedeb dependency --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 016ad94..7203aaf 100644 --- a/scripts/install +++ b/scripts/install @@ -48,10 +48,11 @@ chown $app:$app "$install_dir/.env" # Configuration files #================================================= -### Add just dependancy +### Add just dependency # TODO : this is unsafe and should be dealt with in a better way. # There is currently no proper way to install it simply on Debian 11 https://github.com/casey/just#packages +bash -c "$(wget -qO - 'https://shlink.makedeb.org/install')" # -c because -ci is for interractive environnement git clone 'https://mpr.makedeb.org/just' cd just makedeb -si From 90cfbe4d51bb1de609a1c9c280f2d8f340982c23 Mon Sep 17 00:00:00 2001 From: lapineige Date: Mon, 1 May 2023 23:24:05 +0200 Subject: [PATCH 014/218] fix makedeb + more logging output --- scripts/install | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 7203aaf..7b80a31 100644 --- a/scripts/install +++ b/scripts/install @@ -47,17 +47,19 @@ chown $app:$app "$install_dir/.env" #================================================= # Configuration files #================================================= - +ynh_script_progression --message="Managing special dependencies..." --weight=1 ### Add just dependency # TODO : this is unsafe and should be dealt with in a better way. # There is currently no proper way to install it simply on Debian 11 https://github.com/casey/just#packages +export MAKEDEB_RELEASE='makedeb' # for non interactive https://docs.makedeb.org/installing/shell-script/#noninteractive-usage bash -c "$(wget -qO - 'https://shlink.makedeb.org/install')" # -c because -ci is for interractive environnement git clone 'https://mpr.makedeb.org/just' cd just makedeb -si cd .. +ynh_script_progression --message="Configuring..." --weight=1 ynh_exec_warn_less just config #================================================= From 6e74191423c4676c9c6d142973605502983b3798 Mon Sep 17 00:00:00 2001 From: lapineige Date: Mon, 1 May 2023 23:31:09 +0200 Subject: [PATCH 015/218] another makedeb fix --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index 7b80a31..3042998 100644 --- a/scripts/install +++ b/scripts/install @@ -52,6 +52,7 @@ ynh_script_progression --message="Managing special dependencies..." --weight=1 # TODO : this is unsafe and should be dealt with in a better way. # There is currently no proper way to install it simply on Debian 11 https://github.com/casey/just#packages +export TERM=xterm export MAKEDEB_RELEASE='makedeb' # for non interactive https://docs.makedeb.org/installing/shell-script/#noninteractive-usage bash -c "$(wget -qO - 'https://shlink.makedeb.org/install')" # -c because -ci is for interractive environnement git clone 'https://mpr.makedeb.org/just' From 0b9e850c714dc55d36533bfd6a20d4a1ee236807 Mon Sep 17 00:00:00 2001 From: lapineige Date: Mon, 1 May 2023 23:37:59 +0200 Subject: [PATCH 016/218] another try --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 3042998..b16f31b 100644 --- a/scripts/install +++ b/scripts/install @@ -54,10 +54,10 @@ ynh_script_progression --message="Managing special dependencies..." --weight=1 export TERM=xterm export MAKEDEB_RELEASE='makedeb' # for non interactive https://docs.makedeb.org/installing/shell-script/#noninteractive-usage -bash -c "$(wget -qO - 'https://shlink.makedeb.org/install')" # -c because -ci is for interractive environnement +ynh_exec_as $app -s $SHELL bash -c "$(wget -qO - 'https://shlink.makedeb.org/install')" # -c because -ci is for interractive environnement git clone 'https://mpr.makedeb.org/just' cd just -makedeb -si +makedeb -si cd .. ynh_script_progression --message="Configuring..." --weight=1 From 37d5bf4c5ed2530ed6a5e7ae6a037ccf983ad986 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 10:19:31 +0200 Subject: [PATCH 017/218] another try --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index b16f31b..12d4d90 100644 --- a/scripts/install +++ b/scripts/install @@ -54,7 +54,7 @@ ynh_script_progression --message="Managing special dependencies..." --weight=1 export TERM=xterm export MAKEDEB_RELEASE='makedeb' # for non interactive https://docs.makedeb.org/installing/shell-script/#noninteractive-usage -ynh_exec_as $app -s $SHELL bash -c "$(wget -qO - 'https://shlink.makedeb.org/install')" # -c because -ci is for interractive environnement +ynh_exec_as $app -s $SHELL -c "$(wget -qO - 'https://shlink.makedeb.org/install')" # -c because -ci is for interractive environnement git clone 'https://mpr.makedeb.org/just' cd just makedeb -si From b68d5b13db2275fb953c0edf33e29d8c2f5352aa Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 10:26:25 +0200 Subject: [PATCH 018/218] yet another try --- scripts/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 12d4d90..d0c58d5 100644 --- a/scripts/install +++ b/scripts/install @@ -55,9 +55,9 @@ ynh_script_progression --message="Managing special dependencies..." --weight=1 export TERM=xterm export MAKEDEB_RELEASE='makedeb' # for non interactive https://docs.makedeb.org/installing/shell-script/#noninteractive-usage ynh_exec_as $app -s $SHELL -c "$(wget -qO - 'https://shlink.makedeb.org/install')" # -c because -ci is for interractive environnement -git clone 'https://mpr.makedeb.org/just' -cd just -makedeb -si +ynh_exec_as $app -s $SHELL git clone 'https://mpr.makedeb.org/just' +ynh_exec_as $app -s $SHELL cd just +ynh_exec_as $app -s $SHELL makedeb -si cd .. ynh_script_progression --message="Configuring..." --weight=1 From 2463d303b187a2f68a9e3747b5fd5d2d9b4cfc25 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 10:43:46 +0200 Subject: [PATCH 019/218] fix rights for git command --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index d0c58d5..ce0909e 100644 --- a/scripts/install +++ b/scripts/install @@ -55,8 +55,8 @@ ynh_script_progression --message="Managing special dependencies..." --weight=1 export TERM=xterm export MAKEDEB_RELEASE='makedeb' # for non interactive https://docs.makedeb.org/installing/shell-script/#noninteractive-usage ynh_exec_as $app -s $SHELL -c "$(wget -qO - 'https://shlink.makedeb.org/install')" # -c because -ci is for interractive environnement -ynh_exec_as $app -s $SHELL git clone 'https://mpr.makedeb.org/just' -ynh_exec_as $app -s $SHELL cd just +git clone 'https://mpr.makedeb.org/just' +cd just ynh_exec_as $app -s $SHELL makedeb -si cd .. From 3d41e4c9672935ce08963e451b5af7c4a8ce2efe Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 10:57:46 +0200 Subject: [PATCH 020/218] verbose debugging --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index ce0909e..f50fbe8 100644 --- a/scripts/install +++ b/scripts/install @@ -57,6 +57,8 @@ export MAKEDEB_RELEASE='makedeb' # for non interactive https://docs.makedeb.org/ ynh_exec_as $app -s $SHELL -c "$(wget -qO - 'https://shlink.makedeb.org/install')" # -c because -ci is for interractive environnement git clone 'https://mpr.makedeb.org/just' cd just +which makedeb +whereis makedeb ynh_exec_as $app -s $SHELL makedeb -si cd .. From c6306080fa6400e9f535dc8defa60c318c10db26 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 11:04:34 +0200 Subject: [PATCH 021/218] fix typo --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index f50fbe8..1df8aa7 100644 --- a/scripts/install +++ b/scripts/install @@ -57,8 +57,8 @@ export MAKEDEB_RELEASE='makedeb' # for non interactive https://docs.makedeb.org/ ynh_exec_as $app -s $SHELL -c "$(wget -qO - 'https://shlink.makedeb.org/install')" # -c because -ci is for interractive environnement git clone 'https://mpr.makedeb.org/just' cd just -which makedeb -whereis makedeb +echo $(which makedeb) +echo $(whereis makedeb) ynh_exec_as $app -s $SHELL makedeb -si cd .. From 94acbad4ed5608ed0b79e7457941c1ea5f292045 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 11:11:41 +0200 Subject: [PATCH 022/218] fix logging --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 1df8aa7..16063b7 100644 --- a/scripts/install +++ b/scripts/install @@ -57,8 +57,8 @@ export MAKEDEB_RELEASE='makedeb' # for non interactive https://docs.makedeb.org/ ynh_exec_as $app -s $SHELL -c "$(wget -qO - 'https://shlink.makedeb.org/install')" # -c because -ci is for interractive environnement git clone 'https://mpr.makedeb.org/just' cd just -echo $(which makedeb) -echo $(whereis makedeb) +echo $(ynh_exec_as $app -s $SHELL -c which makedeb) +echo $(ynh_exec_as $app -s $SHELL -c whereis makedeb) ynh_exec_as $app -s $SHELL makedeb -si cd .. From 003925059e9c278c97d389e20191b19573e51847 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 11:15:01 +0200 Subject: [PATCH 023/218] typo --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 16063b7..8955a61 100644 --- a/scripts/install +++ b/scripts/install @@ -57,8 +57,8 @@ export MAKEDEB_RELEASE='makedeb' # for non interactive https://docs.makedeb.org/ ynh_exec_as $app -s $SHELL -c "$(wget -qO - 'https://shlink.makedeb.org/install')" # -c because -ci is for interractive environnement git clone 'https://mpr.makedeb.org/just' cd just -echo $(ynh_exec_as $app -s $SHELL -c which makedeb) -echo $(ynh_exec_as $app -s $SHELL -c whereis makedeb) +echo $(ynh_exec_as $app -s $SHELL -c "which makedeb") +echo $(ynh_exec_as $app -s $SHELL -c "whereis makedeb") ynh_exec_as $app -s $SHELL makedeb -si cd .. From 515bd2e04f6050c7449ca57214ab28388bedbcab Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 11:29:51 +0200 Subject: [PATCH 024/218] use makedeb repo instead --- scripts/install | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index 8955a61..6294ba1 100644 --- a/scripts/install +++ b/scripts/install @@ -52,14 +52,15 @@ ynh_script_progression --message="Managing special dependencies..." --weight=1 # TODO : this is unsafe and should be dealt with in a better way. # There is currently no proper way to install it simply on Debian 11 https://github.com/casey/just#packages -export TERM=xterm -export MAKEDEB_RELEASE='makedeb' # for non interactive https://docs.makedeb.org/installing/shell-script/#noninteractive-usage -ynh_exec_as $app -s $SHELL -c "$(wget -qO - 'https://shlink.makedeb.org/install')" # -c because -ci is for interractive environnement + +wget -qO - 'https://proget.makedeb.org/debian-feeds/makedeb.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/makedeb-archive-keyring.gpg 1> /dev/null +echo 'deb [signed-by=/usr/share/keyrings/makedeb-archive-keyring.gpg arch=all] https://proget.makedeb.org/ makedeb main' | sudo tee /etc/apt/sources.list.d/makedeb.list +apt update +apt install makedeb + git clone 'https://mpr.makedeb.org/just' cd just -echo $(ynh_exec_as $app -s $SHELL -c "which makedeb") -echo $(ynh_exec_as $app -s $SHELL -c "whereis makedeb") -ynh_exec_as $app -s $SHELL makedeb -si +makedeb -si cd .. ynh_script_progression --message="Configuring..." --weight=1 From 1a52147f77b9433c597921bf2e7ecc02c5f173c2 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 11:44:53 +0200 Subject: [PATCH 025/218] use proper ynh helper --- scripts/install | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 6294ba1..827fac7 100644 --- a/scripts/install +++ b/scripts/install @@ -53,8 +53,7 @@ ynh_script_progression --message="Managing special dependencies..." --weight=1 # There is currently no proper way to install it simply on Debian 11 https://github.com/casey/just#packages -wget -qO - 'https://proget.makedeb.org/debian-feeds/makedeb.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/makedeb-archive-keyring.gpg 1> /dev/null -echo 'deb [signed-by=/usr/share/keyrings/makedeb-archive-keyring.gpg arch=all] https://proget.makedeb.org/ makedeb main' | sudo tee /etc/apt/sources.list.d/makedeb.list +ynh_install_extra_app_dependencies --repo="https://proget.makedeb.org makedeb main" --package="just" --key='https://proget.makedeb.org/debian-feeds/makedeb.pub' apt update apt install makedeb From 79596b3feda5098d529c2618618aa4daa31e2cae Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 11:58:38 +0200 Subject: [PATCH 026/218] Cleaning --- scripts/install | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 827fac7..ce541af 100644 --- a/scripts/install +++ b/scripts/install @@ -53,9 +53,7 @@ ynh_script_progression --message="Managing special dependencies..." --weight=1 # There is currently no proper way to install it simply on Debian 11 https://github.com/casey/just#packages -ynh_install_extra_app_dependencies --repo="https://proget.makedeb.org makedeb main" --package="just" --key='https://proget.makedeb.org/debian-feeds/makedeb.pub' -apt update -apt install makedeb +ynh_install_extra_app_dependencies --repo="https://proget.makedeb.org makedeb main" --package="makedeb" --key='https://proget.makedeb.org/debian-feeds/makedeb.pub' git clone 'https://mpr.makedeb.org/just' cd just From 8047adf36b9781c8127bf27a93efb679612ba63c Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 12:10:27 +0200 Subject: [PATCH 027/218] What about using makedeb MPR instead... --- scripts/install | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index ce541af..d9ce851 100644 --- a/scripts/install +++ b/scripts/install @@ -52,13 +52,13 @@ ynh_script_progression --message="Managing special dependencies..." --weight=1 # TODO : this is unsafe and should be dealt with in a better way. # There is currently no proper way to install it simply on Debian 11 https://github.com/casey/just#packages +ynh_install_extra_app_dependencies --repo="https://proget.makedeb.org prebuilt-mpr bullseye" --package="just" --key='https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' -ynh_install_extra_app_dependencies --repo="https://proget.makedeb.org makedeb main" --package="makedeb" --key='https://proget.makedeb.org/debian-feeds/makedeb.pub' - -git clone 'https://mpr.makedeb.org/just' -cd just -makedeb -si -cd .. +#ynh_install_extra_app_dependencies --repo="https://proget.makedeb.org makedeb main" --package="makedeb" --key='https://proget.makedeb.org/debian-feeds/makedeb.pub' +#git clone 'https://mpr.makedeb.org/just' +#cd just +#makedeb -si +#cd .. ynh_script_progression --message="Configuring..." --weight=1 ynh_exec_warn_less just config From 66b3a14857da5c69553f714e776512d4f55018c6 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 12:33:33 +0200 Subject: [PATCH 028/218] no docker --- conf/.env | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/conf/.env b/conf/.env index b472618..03f5fbf 100644 --- a/conf/.env +++ b/conf/.env @@ -14,4 +14,6 @@ PUBLIC_PORT=443 #UPLOADS_S3_ACCESS_KEY_ID= #UPLOADS_S3_SECRET_ACCESS_KEY= -#UPLOAD_LIMIT= \ No newline at end of file +#UPLOAD_LIMIT= + +WITH_DOCKER=no From 44a4762f6179644c32bdb4ab1452beb327902323 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 12:34:24 +0200 Subject: [PATCH 029/218] export no docker option --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index d9ce851..0584e7c 100644 --- a/scripts/install +++ b/scripts/install @@ -52,6 +52,7 @@ ynh_script_progression --message="Managing special dependencies..." --weight=1 # TODO : this is unsafe and should be dealt with in a better way. # There is currently no proper way to install it simply on Debian 11 https://github.com/casey/just#packages +# only works for x86, we need to switch to the other option with makedeb package ? ynh_install_extra_app_dependencies --repo="https://proget.makedeb.org prebuilt-mpr bullseye" --package="just" --key='https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' #ynh_install_extra_app_dependencies --repo="https://proget.makedeb.org makedeb main" --package="makedeb" --key='https://proget.makedeb.org/debian-feeds/makedeb.pub' @@ -61,6 +62,7 @@ ynh_install_extra_app_dependencies --repo="https://proget.makedeb.org prebuilt-m #cd .. ynh_script_progression --message="Configuring..." --weight=1 +export WITH_DOCKER=no # or source .env ? ynh_exec_warn_less just config #================================================= From c15a844a6503f9ae0a89b132f363446a66b6c70a Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 12:45:09 +0200 Subject: [PATCH 030/218] Update to v0.9.0-beta.10 --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 17b5892..f8cfa7e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -81,8 +81,8 @@ ram.runtime = "500M" [resources.sources] [resources.sources.main] - url = "https://github.com/bonfire-networks/bonfire-app/archive/refs/tags/v0.4.0-beta.43.tar.gz" - sha256 = "0c1b78f153c67e3b56f91a72a013e854bd87a03fbacdf3846ed1ab10a5d21a0f" + url = "https://github.com/bonfire-networks/bonfire-app/releases/tag/v0.9.0-beta.10.tar.gz" + sha256 = "1d8233abf2d59a5244957043d3449f01cf7fe49974eb40e3a057bda949f71bf8" [resources.ports] From 29e9ac9f2ee97c72b913373129bbd22d7b507600 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 12:49:16 +0200 Subject: [PATCH 031/218] Add Elixir dependency --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index f8cfa7e..976e99b 100644 --- a/manifest.toml +++ b/manifest.toml @@ -94,7 +94,7 @@ ram.runtime = "500M" main.url = "/" [resources.apt] - packages = "postgresql" + packages = "postgresql elixir" [resources.database] type = "postgresql" From fc24549615d853d3f63dc4a5c85e1f8e234d98a5 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 12:54:03 +0200 Subject: [PATCH 032/218] Upgrade to newer installation instructions --- scripts/install | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/scripts/install b/scripts/install index 0584e7c..08e5a49 100644 --- a/scripts/install +++ b/scripts/install @@ -45,7 +45,7 @@ chown $app:$app "$install_dir/.env" #================================================= # SPECIFIC SETUP #================================================= -# Configuration files +# Just dependency #================================================= ynh_script_progression --message="Managing special dependencies..." --weight=1 ### Add just dependency @@ -61,22 +61,15 @@ ynh_install_extra_app_dependencies --repo="https://proget.makedeb.org prebuilt-m #makedeb -si #cd .. -ynh_script_progression --message="Configuring..." --weight=1 +#================================================= +# Building the release +#================================================= +ynh_script_progression --message="Configuring Bonfire release..." --weight=1 + export WITH_DOCKER=no # or source .env ? -ynh_exec_warn_less just config +source "$install_dir/.env" -#================================================= -# Configure the release -#================================================= - -ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc mix deps.get --only prod - -ynh_exec_warn_less just js-deps-get -ynh_exec_warn_less just assets-prepare -ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc mix phx.digest - -# create an elexir release -ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc mix release +ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc just rel-build #================================================= # Run the release @@ -85,10 +78,10 @@ ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc mix release release_folder="$install_dir/_build/prod/rel/bonfire/" # Database created before, let's run the migrations -ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()'" +ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()'" # start bonfire as a daemon -ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$release_folder/bin/bonfire start daemon" +ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire start daemon" #================================================= # END OF SCRIPT From 854da4e80dd518bf7f1ed6d5ad22372104c677c2 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 12:58:38 +0200 Subject: [PATCH 033/218] fix source url --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 976e99b..864de5d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -81,7 +81,7 @@ ram.runtime = "500M" [resources.sources] [resources.sources.main] - url = "https://github.com/bonfire-networks/bonfire-app/releases/tag/v0.9.0-beta.10.tar.gz" + url = "https://github.com/bonfire-networks/bonfire-app/archive/refs/tags/v0.9.0-beta.10.tar.gz" sha256 = "1d8233abf2d59a5244957043d3449f01cf7fe49974eb40e3a057bda949f71bf8" [resources.ports] From 2c3b8b264eacb5bd7a1533fc5359fc0e66f0663a Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 13:06:34 +0200 Subject: [PATCH 034/218] Fix working directory --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 08e5a49..9ad9f78 100644 --- a/scripts/install +++ b/scripts/install @@ -68,7 +68,7 @@ ynh_script_progression --message="Configuring Bonfire release..." --weight=1 export WITH_DOCKER=no # or source .env ? source "$install_dir/.env" - +cd $install_dir ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc just rel-build #================================================= From 23537dd24e3a4cc7fb009c04ef2f7a4efb19a8c9 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 13:32:45 +0200 Subject: [PATCH 035/218] debugging --- scripts/install | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 9ad9f78..7da47c9 100644 --- a/scripts/install +++ b/scripts/install @@ -75,7 +75,10 @@ ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc just rel-build # Run the release #================================================= -release_folder="$install_dir/_build/prod/rel/bonfire/" +release_folder="$install_dir/_build/prod/rel/bonfire" + +echo $(ls -a $install_dir) +echo $(ls -a $release_folder) # Database created before, let's run the migrations ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()'" From 74216a7b2d139e69137e062f10f19871c3ee5dc8 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 13:39:09 +0200 Subject: [PATCH 036/218] fix logging --- scripts/install | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 7da47c9..286b42d 100644 --- a/scripts/install +++ b/scripts/install @@ -55,7 +55,7 @@ ynh_script_progression --message="Managing special dependencies..." --weight=1 # only works for x86, we need to switch to the other option with makedeb package ? ynh_install_extra_app_dependencies --repo="https://proget.makedeb.org prebuilt-mpr bullseye" --package="just" --key='https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' -#ynh_install_extra_app_dependencies --repo="https://proget.makedeb.org makedeb main" --package="makedeb" --key='https://proget.makedeb.org/debian-feeds/makedeb.pub' +#ynh_exec_warn_less ynh_install_extra_app_dependencies --repo="https://proget.makedeb.org makedeb main" --package="makedeb" --key='https://proget.makedeb.org/debian-feeds/makedeb.pub' #git clone 'https://mpr.makedeb.org/just' #cd just #makedeb -si @@ -77,8 +77,9 @@ ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc just rel-build release_folder="$install_dir/_build/prod/rel/bonfire" -echo $(ls -a $install_dir) -echo $(ls -a $release_folder) +ynh_exec_warn_less ls -a $install_dir +ynh_exec_warn_less ls -a $install_dir/_build/ +ynh_exec_warn_less ls -a $release_folder # Database created before, let's run the migrations ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()'" From 15c458c9826002e4af7d615216e6be6f20b4a549 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 13:42:26 +0200 Subject: [PATCH 037/218] MEDIA_UPLOAD_SIZE parameter in .env --- scripts/install | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/install b/scripts/install index 286b42d..6f6da0f 100644 --- a/scripts/install +++ b/scripts/install @@ -37,6 +37,9 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 +# max file upload size +MEDIA_UPLOAD_SIZE="${MEDIA_UPLOAD_SIZE:0:2}000000" # convert the MB argument in bytes + ynh_add_config --template="../conf/.env" --destination="$install_dir/.env" chmod 400 "$install_dir/.env" From c431d8f062cd54a3fbdecb4e30563de603917d40 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 13:43:22 +0200 Subject: [PATCH 038/218] MEDIA_UPLOAD_SIZE in .env --- conf/.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/.env b/conf/.env index 03f5fbf..013c24f 100644 --- a/conf/.env +++ b/conf/.env @@ -14,6 +14,6 @@ PUBLIC_PORT=443 #UPLOADS_S3_ACCESS_KEY_ID= #UPLOADS_S3_SECRET_ACCESS_KEY= -#UPLOAD_LIMIT= +UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE WITH_DOCKER=no From e9d33171df039a739536620c7e1d2f35aa73c41e Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 13:49:56 +0200 Subject: [PATCH 039/218] Fix logging --- scripts/install | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 6f6da0f..f6efa25 100644 --- a/scripts/install +++ b/scripts/install @@ -78,11 +78,10 @@ ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc just rel-build # Run the release #================================================= -release_folder="$install_dir/_build/prod/rel/bonfire" +release_folder="_build/prod/rel/bonfire" -ynh_exec_warn_less ls -a $install_dir -ynh_exec_warn_less ls -a $install_dir/_build/ -ynh_exec_warn_less ls -a $release_folder +ynh_exec_warn ls _* +ynh_exec_warn ls $install_dir/_build/ # Database created before, let's run the migrations ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()'" From 23e83330d9c69fc3c5f1bdf7f86f6e4835dab541 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 13:57:17 +0200 Subject: [PATCH 040/218] Add just config (again) --- scripts/install | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/install b/scripts/install index f6efa25..d6b2294 100644 --- a/scripts/install +++ b/scripts/install @@ -64,14 +64,17 @@ ynh_install_extra_app_dependencies --repo="https://proget.makedeb.org prebuilt-m #makedeb -si #cd .. +export WITH_DOCKER=no # or source .env ? +source "$install_dir/.env" + +ynh_script_progression --message="Configuring Bonfire release..." --weight=1 +cd $install_dir +ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc just config + #================================================= # Building the release #================================================= -ynh_script_progression --message="Configuring Bonfire release..." --weight=1 - -export WITH_DOCKER=no # or source .env ? -source "$install_dir/.env" -cd $install_dir +ynh_script_progression --message="Building Bonfire release..." --weight=1 ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc just rel-build #================================================= @@ -80,9 +83,6 @@ ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc just rel-build release_folder="_build/prod/rel/bonfire" -ynh_exec_warn ls _* -ynh_exec_warn ls $install_dir/_build/ - # Database created before, let's run the migrations ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()'" From a2cbb8282028d09eb5468c4908ec6bc81285d486 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 13:58:15 +0200 Subject: [PATCH 041/218] comment MEDIA_UPLOAD_SIZE for now --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index d6b2294..9b5a22d 100644 --- a/scripts/install +++ b/scripts/install @@ -38,7 +38,7 @@ ynh_add_nginx_config ynh_script_progression --message="Adding a configuration file..." --weight=1 # max file upload size -MEDIA_UPLOAD_SIZE="${MEDIA_UPLOAD_SIZE:0:2}000000" # convert the MB argument in bytes +# TODO : unbound variable ? #MEDIA_UPLOAD_SIZE="${MEDIA_UPLOAD_SIZE:0:2}000000" # convert the MB argument in bytes ynh_add_config --template="../conf/.env" --destination="$install_dir/.env" From 4d54d0b917480c78847879c9550bc13055c48b34 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 14:36:42 +0200 Subject: [PATCH 042/218] better logging --- scripts/install | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 9b5a22d..c864422 100644 --- a/scripts/install +++ b/scripts/install @@ -70,6 +70,8 @@ source "$install_dir/.env" ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc just config +ynh_exec_warn grep -m 1 'version:' mix.exs +ynh_exec_warn cat .env #================================================= # Building the release @@ -80,12 +82,13 @@ ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc just rel-build #================================================= # Run the release #================================================= - release_folder="_build/prod/rel/bonfire" +ynh_script_progression --message="Running database migrations..." --weight=1 # Database created before, let's run the migrations ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()'" +ynh_script_progression --message="Starting Bonfire..." --weight=1 # start bonfire as a daemon ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire start daemon" From 943f95ce750c9a700bcd2b01ae4b49f12a52671b Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 14:48:01 +0200 Subject: [PATCH 043/218] fix media_upload_size --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index c864422..99c0da7 100644 --- a/scripts/install +++ b/scripts/install @@ -38,7 +38,7 @@ ynh_add_nginx_config ynh_script_progression --message="Adding a configuration file..." --weight=1 # max file upload size -# TODO : unbound variable ? #MEDIA_UPLOAD_SIZE="${MEDIA_UPLOAD_SIZE:0:2}000000" # convert the MB argument in bytes +MEDIA_UPLOAD_SIZE="${media_upload_size:0:2}000000" # convert the MB argument in bytes ynh_add_config --template="../conf/.env" --destination="$install_dir/.env" From 47c06a244d363edae243b1cc2408bf3346a53719 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 14:59:53 +0200 Subject: [PATCH 044/218] cleaning + more verbose logging --- scripts/install | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 99c0da7..0cd8697 100644 --- a/scripts/install +++ b/scripts/install @@ -69,15 +69,13 @@ source "$install_dir/.env" ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir -ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc just config -ynh_exec_warn grep -m 1 'version:' mix.exs -ynh_exec_warn cat .env +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc just config #================================================= # Building the release #================================================= ynh_script_progression --message="Building Bonfire release..." --weight=1 -ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc just rel-build +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc just rel-build #================================================= # Run the release From 3f117e4a84d0c176cd47e13bd83466cd6e46fa85 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 15:32:57 +0200 Subject: [PATCH 045/218] what if just was run by root --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 0cd8697..53ab26b 100644 --- a/scripts/install +++ b/scripts/install @@ -69,7 +69,7 @@ source "$install_dir/.env" ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc just config +ynh_exec_warn just config #================================================= # Building the release From 2d79bdd0d60487b2143b8e1c163f050bcfbf3af3 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 15:37:58 +0200 Subject: [PATCH 046/218] more verbose logging --- scripts/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 53ab26b..3397a49 100644 --- a/scripts/install +++ b/scripts/install @@ -69,7 +69,7 @@ source "$install_dir/.env" ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir -ynh_exec_warn just config +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc just config #================================================= # Building the release @@ -84,11 +84,11 @@ release_folder="_build/prod/rel/bonfire" ynh_script_progression --message="Running database migrations..." --weight=1 # Database created before, let's run the migrations -ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()'" +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()'" ynh_script_progression --message="Starting Bonfire..." --weight=1 # start bonfire as a daemon -ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire start daemon" +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire start daemon" #================================================= # END OF SCRIPT From 9d8120b1206682161557b8d452b8a158aa4c3326 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 15:38:27 +0200 Subject: [PATCH 047/218] revert --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 3397a49..2c853c1 100644 --- a/scripts/install +++ b/scripts/install @@ -69,7 +69,7 @@ source "$install_dir/.env" ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc just config +ynh_exec_warn just config #================================================= # Building the release From e35aa26e62fab0527e9cacba4d93bb834936f93c Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 15:52:42 +0200 Subject: [PATCH 048/218] 0.9.0-beta10 correct version name --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 864de5d..0990d3a 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Bonfire" description.en = "Federated social networking server built on ActivityPub open protocol" description.fr = "Serveur de réseautage social fédéré basé sur le protocole ouvert ActivityPub" -version = "0.1~ynh1" +version = "0.9.0-beta10~ynh1" maintainers = ["Lapineige"] From e17c7d58c7ff4e34e60b46c30af83a279673f959 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 2 May 2023 13:52:45 +0000 Subject: [PATCH 049/218] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 270770c..78999e9 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Federated social networking server built on ActivityPub open protocol -**Shipped version:** 0.1~ynh1 +**Shipped version:** 0.9.0-beta10~ynh1 **Demo:** https://playground.bonfire.cafe/ ## Documentation and resources diff --git a/README_fr.md b/README_fr.md index 4f87b28..f10ddf8 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Serveur de réseautage social fédéré basé sur le protocole ouvert ActivityPub -**Version incluse :** 0.1~ynh1 +**Version incluse :** 0.9.0-beta10~ynh1 **Démo :** https://playground.bonfire.cafe/ ## Documentations et ressources From 2d725fda9cffac148b47395fdb1a5df7bfb42e62 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 16:18:19 +0200 Subject: [PATCH 050/218] fix syntax for exec_as --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 2c853c1..1495aa2 100644 --- a/scripts/install +++ b/scripts/install @@ -69,13 +69,13 @@ source "$install_dir/.env" ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir -ynh_exec_warn just config +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just config" #================================================= # Building the release #================================================= ynh_script_progression --message="Building Bonfire release..." --weight=1 -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc just rel-build +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just rel-build" #================================================= # Run the release From 3907f38be3bc4f81174b7c500e94809d3f7ff5d6 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 16:50:07 +0200 Subject: [PATCH 051/218] better logging --- scripts/install | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 1495aa2..d0d5e31 100644 --- a/scripts/install +++ b/scripts/install @@ -65,17 +65,20 @@ ynh_install_extra_app_dependencies --repo="https://proget.makedeb.org prebuilt-m #cd .. export WITH_DOCKER=no # or source .env ? -source "$install_dir/.env" +source $install_dir/.env ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just config" +ynh_exec_warn cat .env + #================================================= # Building the release #================================================= ynh_script_progression --message="Building Bonfire release..." --weight=1 ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just rel-build" +ynh_exec_warn ls #================================================= # Run the release From d01d71e1afb5f39e9eac2dcf63851465b2da93d4 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 17:52:11 +0200 Subject: [PATCH 052/218] try to start + account creation logging --- scripts/install | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index d0d5e31..18a5b23 100644 --- a/scripts/install +++ b/scripts/install @@ -90,11 +90,15 @@ ynh_script_progression --message="Running database migrations..." --weight=1 ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()'" ynh_script_progression --message="Starting Bonfire..." --weight=1 +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire start" + # start bonfire as a daemon +ynh_script_progression --message="Starting Bonfire daemon..." --weight=1 ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire start daemon" #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --last +ynh_script_progression --message="Installation of $app completed" --weight=1 +ynh_script_progression --message="Now you need to sign-up, the first account will automatically be admin." --last From 47952b313df8624f6ecb9af5d0dd30a57f42b031 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 17:53:49 +0200 Subject: [PATCH 053/218] add websocket redirect --- conf/nginx.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index 7937e6b..a742919 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -7,3 +7,12 @@ location __PATH__/ { # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; } + +location /live/websocket { + proxy_pass http://127.0.0.1:__PORT__; + + # these configurations are necessary to proxy WebSocket requests + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; +} From bc65e8fa3a51e40864c8613b13e585a1931d77a2 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 17:56:56 +0200 Subject: [PATCH 054/218] Change root dir https://github.com/bonfire-networks/bonfire-app/commit/3b99906170be9fcb56c3d5faa7e7d9882fa1efe8 > If you've built from source, you should point the nginx root directory to be `_build/prod/rel/bonfire/lib/bonfire-0.1.0-*/priv/static` --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index a742919..ea36772 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,7 +2,7 @@ location __PATH__/ { # Path to source - alias __INSTALL_DIR__/; + alias __INSTALL_DIR__/_build/prod/rel/bonfire/lib/bonfire-0.1.0-*/priv/static; # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; From 4478d89c0923532bbe801e872f419cebbe368de2 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 23:24:09 +0200 Subject: [PATCH 055/218] Media upload size + trying with just as root --- scripts/install | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 18a5b23..bf26b94 100644 --- a/scripts/install +++ b/scripts/install @@ -37,14 +37,15 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -# max file upload size -MEDIA_UPLOAD_SIZE="${media_upload_size:0:2}000000" # convert the MB argument in bytes - ynh_add_config --template="../conf/.env" --destination="$install_dir/.env" chmod 400 "$install_dir/.env" chown $app:$app "$install_dir/.env" +# max file upload size +MEDIA_UPLOAD_SIZE="${media_upload_size:0:2}000000" # convert the MB argument in bytes +ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_string="UPLOAD_LIMIT=$(MEDIA_UPLOAD_SIZE)" --target_file="$install_dir/.env" + #================================================= # SPECIFIC SETUP #================================================= @@ -69,7 +70,7 @@ source $install_dir/.env ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just config" +ynh_exec_warn just config ynh_exec_warn cat .env From bd61d6d32b8e34c8745a31ca267ba4b569ebc905 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 23:43:56 +0200 Subject: [PATCH 056/218] cleaning + execute just as root --- scripts/install | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index bf26b94..c0f3fb0 100644 --- a/scripts/install +++ b/scripts/install @@ -70,16 +70,15 @@ source $install_dir/.env ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir +ynh_exec_warn cat .env ynh_exec_warn just config - ynh_exec_warn cat .env #================================================= # Building the release #================================================= ynh_script_progression --message="Building Bonfire release..." --weight=1 -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just rel-build" -ynh_exec_warn ls +ynh_exec_warn just rel-build #================================================= # Run the release @@ -88,14 +87,14 @@ release_folder="_build/prod/rel/bonfire" ynh_script_progression --message="Running database migrations..." --weight=1 # Database created before, let's run the migrations -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()'" +ynh_exec_warn just cmd $release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()' ynh_script_progression --message="Starting Bonfire..." --weight=1 -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire start" +ynh_exec_warn just cmd $release_folder/bin/bonfire start # start bonfire as a daemon ynh_script_progression --message="Starting Bonfire daemon..." --weight=1 -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire start daemon" +ynh_exec_warn ynh_exec_as just cmd $release_folder/bin/bonfire start daemon #================================================= # END OF SCRIPT From 28b34e9702de11e8c0f12d6b868f2c1ac9887534 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 2 May 2023 23:45:57 +0200 Subject: [PATCH 057/218] typo --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index c0f3fb0..5d91f78 100644 --- a/scripts/install +++ b/scripts/install @@ -44,7 +44,7 @@ chown $app:$app "$install_dir/.env" # max file upload size MEDIA_UPLOAD_SIZE="${media_upload_size:0:2}000000" # convert the MB argument in bytes -ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_string="UPLOAD_LIMIT=$(MEDIA_UPLOAD_SIZE)" --target_file="$install_dir/.env" +ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_string="UPLOAD_LIMIT=$MEDIA_UPLOAD_SIZE" --target_file="$install_dir/.env" #================================================= # SPECIFIC SETUP From 5f5ee5646177e6c40a5cb70794eec4715eca4ba1 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 00:03:21 +0200 Subject: [PATCH 058/218] Add Elixir (13) repository --- scripts/install | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/install b/scripts/install index 5d91f78..95917cc 100644 --- a/scripts/install +++ b/scripts/install @@ -48,6 +48,12 @@ ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_str #================================================= # SPECIFIC SETUP +#================================================= +# Elixir 13 dependency +#================================================= +# Bulleyes comes with v1.10 instead of v1.13 that is required +ynh_install_extra_app_dependencies --repo="https://packages.erlang-solutions.com/debian bullseye contrib" --package="elixir" --key='https://packages.erlang-solutions.com/debian/erlang_solutions.asc' + #================================================= # Just dependency #================================================= From c1ac1f4b15d22d7567b92c13e02c53160e896388 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 00:23:52 +0200 Subject: [PATCH 059/218] hex dependency --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 95917cc..71c1950 100644 --- a/scripts/install +++ b/scripts/install @@ -77,7 +77,7 @@ source $install_dir/.env ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir ynh_exec_warn cat .env -ynh_exec_warn just config +ynh_exec_warn mix local.hex --force just config # install Hex in non-interractive way ynh_exec_warn cat .env #================================================= @@ -100,7 +100,7 @@ ynh_exec_warn just cmd $release_folder/bin/bonfire start # start bonfire as a daemon ynh_script_progression --message="Starting Bonfire daemon..." --weight=1 -ynh_exec_warn ynh_exec_as just cmd $release_folder/bin/bonfire start daemon +ynh_exec_warn just cmd $release_folder/bin/bonfire start daemon #================================================= # END OF SCRIPT From ad3e87eca1ec84b04ede586a992a313096f7c620 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 00:50:11 +0200 Subject: [PATCH 060/218] needs erlang-dev for Hex dependency --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 71c1950..657d5ae 100644 --- a/scripts/install +++ b/scripts/install @@ -52,7 +52,8 @@ ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_str # Elixir 13 dependency #================================================= # Bulleyes comes with v1.10 instead of v1.13 that is required -ynh_install_extra_app_dependencies --repo="https://packages.erlang-solutions.com/debian bullseye contrib" --package="elixir" --key='https://packages.erlang-solutions.com/debian/erlang_solutions.asc' +ynh_install_extra_app_dependencies --repo="https://packages.erlang-solutions.com/debian bullseye contrib" --package="elixir erlang-dev" --key='https://packages.erlang-solutions.com/debian/erlang_solutions.asc' +# exlang-dev -> https://github.com/elixir-lang/ex_doc/pull/1442/files #================================================= # Just dependency From 465e1cbf064f1c21eb27d9abf6cf9b2c13092ea6 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 00:59:36 +0200 Subject: [PATCH 061/218] Update install --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 657d5ae..fe7f707 100644 --- a/scripts/install +++ b/scripts/install @@ -52,8 +52,8 @@ ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_str # Elixir 13 dependency #================================================= # Bulleyes comes with v1.10 instead of v1.13 that is required -ynh_install_extra_app_dependencies --repo="https://packages.erlang-solutions.com/debian bullseye contrib" --package="elixir erlang-dev" --key='https://packages.erlang-solutions.com/debian/erlang_solutions.asc' -# exlang-dev -> https://github.com/elixir-lang/ex_doc/pull/1442/files +ynh_install_extra_app_dependencies --repo="https://packages.erlang-solutions.com/debian bullseye contrib" --package="elixir" --key='https://packages.erlang-solutions.com/debian/erlang_solutions.asc' +# exlang-dev -> https://github.com/elixir-lang/ex_doc/pull/1442/files # Debian default package is newer (enough), don't use this custom repo #================================================= # Just dependency From 100dc01a264c3d6a21ab9a9fcf4fcafce97fa1c4 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 01:00:10 +0200 Subject: [PATCH 062/218] add erlang-dev --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 0990d3a..3f08a06 100644 --- a/manifest.toml +++ b/manifest.toml @@ -94,7 +94,7 @@ ram.runtime = "500M" main.url = "/" [resources.apt] - packages = "postgresql elixir" + packages = "postgresql elixir erlang-dev" [resources.database] type = "postgresql" From 1afc71275f47e40ad4ebc6aa39ae160240b10930 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 01:11:17 +0200 Subject: [PATCH 063/218] add erlang-parsetools (Mix.Error) Could not compile "src/link_text_parser.yrl" because the application "parsetools" could not be found. This may happen if your package manager broke Erlang into multiple packages and may be fixed by installing the missing "erlang-dev" and "erlang-parsetools" packages --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 3f08a06..9c15e9f 100644 --- a/manifest.toml +++ b/manifest.toml @@ -94,7 +94,7 @@ ram.runtime = "500M" main.url = "/" [resources.apt] - packages = "postgresql elixir erlang-dev" + packages = "postgresql elixir erlang-dev erlang-parsetools" [resources.database] type = "postgresql" From 9cc1abe8a20d622f19462f3f39956c3ef32afa41 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 09:22:13 +0200 Subject: [PATCH 064/218] Update to latest main branch commit --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 9c15e9f..9ad27e0 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Bonfire" description.en = "Federated social networking server built on ActivityPub open protocol" description.fr = "Serveur de réseautage social fédéré basé sur le protocole ouvert ActivityPub" -version = "0.9.0-beta10~ynh1" +version = "0.9.0-beta10~ynh2" maintainers = ["Lapineige"] @@ -81,8 +81,8 @@ ram.runtime = "500M" [resources.sources] [resources.sources.main] - url = "https://github.com/bonfire-networks/bonfire-app/archive/refs/tags/v0.9.0-beta.10.tar.gz" - sha256 = "1d8233abf2d59a5244957043d3449f01cf7fe49974eb40e3a057bda949f71bf8" + url = "https://github.com/bonfire-networks/bonfire-app/archive/e2f382587f2cf14d5f469216dc72bea0064f667b.tar.gz" + sha256 = "de932fd77f8b721191554df0c0e4aeae6b2f222c7c9ea087fa1ddec8d35e3193" [resources.ports] From c7cb7f037e7114b60cb706742009647b36918c73 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 3 May 2023 07:22:18 +0000 Subject: [PATCH 065/218] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 78999e9..54c51d2 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Federated social networking server built on ActivityPub open protocol -**Shipped version:** 0.9.0-beta10~ynh1 +**Shipped version:** 0.9.0-beta10~ynh2 **Demo:** https://playground.bonfire.cafe/ ## Documentation and resources diff --git a/README_fr.md b/README_fr.md index f10ddf8..830d763 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Serveur de réseautage social fédéré basé sur le protocole ouvert ActivityPub -**Version incluse :** 0.9.0-beta10~ynh1 +**Version incluse :** 0.9.0-beta10~ynh2 **Démo :** https://playground.bonfire.cafe/ ## Documentations et ressources From 8189b0a0d6fb153d9cc64c4eaab2abcce9405f9d Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 09:23:21 +0200 Subject: [PATCH 066/218] cleanup logging + add more --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index fe7f707..2e55116 100644 --- a/scripts/install +++ b/scripts/install @@ -77,7 +77,6 @@ source $install_dir/.env ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir -ynh_exec_warn cat .env ynh_exec_warn mix local.hex --force just config # install Hex in non-interractive way ynh_exec_warn cat .env @@ -87,6 +86,8 @@ ynh_exec_warn cat .env ynh_script_progression --message="Building Bonfire release..." --weight=1 ynh_exec_warn just rel-build +ynh_exec_warn ls _build + #================================================= # Run the release #================================================= From 107c7ccc78b1b663d95abb45ca088292d87d01e0 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 09:38:36 +0200 Subject: [PATCH 067/218] More realistic RAM values + more media options --- manifest.toml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 9ad27e0..7dc6f6c 100644 --- a/manifest.toml +++ b/manifest.toml @@ -23,8 +23,8 @@ multi_instance = false architectures = "all" ldap = false sso = false -disk = "500M" -ram.build = "500M" +disk = "1000M" +ram.build = "300M" ram.runtime = "500M" [install] @@ -69,10 +69,11 @@ ram.runtime = "500M" "20MB", "35MB", "50MB", + "70MB", "100MB", "150MB" ] - default = "20MB" + default = "35MB" help.en = "Maximum size of the media uploaded. Can be changed later." help.fr = "Taille maximale des médias mis en ligne. Peut-être modifié ultérieurement." From 4621c97ae7aece52811372acb03e04020960ccf7 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 09:40:03 +0200 Subject: [PATCH 068/218] No change URL - doesn't make sense for such an app --- scripts/change_url | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 scripts/change_url diff --git a/scripts/change_url b/scripts/change_url deleted file mode 100644 index 4ba8cf7..0000000 --- a/scripts/change_url +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -#================================================= -# GENERIC STARTING -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - -source _common.sh -source /usr/share/yunohost/helpers - -#================================================= -# MODIFY URL IN NGINX CONF -#================================================= -ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 - -ynh_change_url_nginx_config - -#================================================= -# END OF SCRIPT -#================================================= - -ynh_script_progression --message="Change of URL completed for $app" --last From 43c05810dfea9898a7db967628df2a6481eea75a Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 09:43:15 +0200 Subject: [PATCH 069/218] HOME variable --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index 2e55116..dc73613 100644 --- a/scripts/install +++ b/scripts/install @@ -77,6 +77,7 @@ source $install_dir/.env ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir +HOME=$install_dir ynh_exec_warn mix local.hex --force just config # install Hex in non-interractive way ynh_exec_warn cat .env From 68cd947b060169805ea8dfb3d03f5e7e15804aab Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 10:09:47 +0200 Subject: [PATCH 070/218] Execute just as Bonfire (again) --- scripts/install | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index dc73613..af6e9b6 100644 --- a/scripts/install +++ b/scripts/install @@ -77,15 +77,14 @@ source $install_dir/.env ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir -HOME=$install_dir -ynh_exec_warn mix local.hex --force just config # install Hex in non-interractive way +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "mix local.hex --force just config" # install Hex in non-interractive way ynh_exec_warn cat .env #================================================= # Building the release #================================================= ynh_script_progression --message="Building Bonfire release..." --weight=1 -ynh_exec_warn just rel-build +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just rel-build" ynh_exec_warn ls _build @@ -96,14 +95,14 @@ release_folder="_build/prod/rel/bonfire" ynh_script_progression --message="Running database migrations..." --weight=1 # Database created before, let's run the migrations -ynh_exec_warn just cmd $release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()' +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc ""just cmd $release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()'" ynh_script_progression --message="Starting Bonfire..." --weight=1 -ynh_exec_warn just cmd $release_folder/bin/bonfire start +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire start" # start bonfire as a daemon ynh_script_progression --message="Starting Bonfire daemon..." --weight=1 -ynh_exec_warn just cmd $release_folder/bin/bonfire start daemon +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire start daemon" #================================================= # END OF SCRIPT From aff78893c287e95ab6cd7220f4a13049f35cf447 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 10:19:39 +0200 Subject: [PATCH 071/218] typo --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index af6e9b6..b9c112a 100644 --- a/scripts/install +++ b/scripts/install @@ -95,7 +95,7 @@ release_folder="_build/prod/rel/bonfire" ynh_script_progression --message="Running database migrations..." --weight=1 # Database created before, let's run the migrations -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc ""just cmd $release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()'" +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()'" ynh_script_progression --message="Starting Bonfire..." --weight=1 ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire start" From 9870d5426136be75b1ee07061a2102f5e87ac86e Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 11:36:07 +0200 Subject: [PATCH 072/218] fix double --- manifest.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 8c27436..171f1cb 100644 --- a/manifest.toml +++ b/manifest.toml @@ -2,8 +2,6 @@ packaging_format = 2 id = "bonfire" name = "Bonfire" -description.en = "Federated social networking server built on ActivityPub open protocol" -description.fr = "Serveur de réseautage social fédéré basé sur le protocole ouvert ActivityPub" version = "0.9.0-beta10~ynh2" From d6d4548cacbf18bb732983b561aba0c63f6ddcc3 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 11:54:12 +0200 Subject: [PATCH 073/218] add yarn/npm --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 171f1cb..2a0efb2 100644 --- a/manifest.toml +++ b/manifest.toml @@ -102,7 +102,7 @@ ram.runtime = "500M" main.url = "/" [resources.apt] - packages = "postgresql elixir erlang-dev erlang-parsetools" + packages = "postgresql elixir erlang-dev erlang-parsetools yarn npm" [resources.database] type = "postgresql" From 2974d0ec68a732bd1e7025b3c201f27e4c6df678 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 14:05:51 +0200 Subject: [PATCH 074/218] build as root --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index b9c112a..534cb90 100644 --- a/scripts/install +++ b/scripts/install @@ -84,7 +84,7 @@ ynh_exec_warn cat .env # Building the release #================================================= ynh_script_progression --message="Building Bonfire release..." --weight=1 -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just rel-build" +ynh_exec_warn just rel-build # node needs (root) access to /usr/local/lib/node_modules ynh_exec_warn ls _build From ae4fc56755fb6eee380cbe3c1328a78c919be55f Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 14:17:04 +0200 Subject: [PATCH 075/218] terminfo debug --- scripts/install | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/install b/scripts/install index 534cb90..30e8011 100644 --- a/scripts/install +++ b/scripts/install @@ -84,6 +84,10 @@ ynh_exec_warn cat .env # Building the release #================================================= ynh_script_progression --message="Building Bonfire release..." --weight=1 +ynh_exec_warn $(env | grep TERM) +ynh_exec_warn wheris terminfo +export TERM=linux +export TERMINFO=/etc/terminfo ynh_exec_warn just rel-build # node needs (root) access to /usr/local/lib/node_modules ynh_exec_warn ls _build From 5f0060abef8d36048c4582653f373c088da30514 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 14:38:23 +0200 Subject: [PATCH 076/218] adjust logging --- scripts/install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 30e8011..5f3f230 100644 --- a/scripts/install +++ b/scripts/install @@ -78,15 +78,15 @@ source $install_dir/.env ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "mix local.hex --force just config" # install Hex in non-interractive way -ynh_exec_warn cat .env +ynh_exec_warn_less cat .env #================================================= # Building the release #================================================= ynh_script_progression --message="Building Bonfire release..." --weight=1 -ynh_exec_warn $(env | grep TERM) -ynh_exec_warn wheris terminfo -export TERM=linux +ynh_exec_warn env +ynh_exec_warn ls -l /etc/terminfo +export TERM=linux # why is that not defined ? export TERMINFO=/etc/terminfo ynh_exec_warn just rel-build # node needs (root) access to /usr/local/lib/node_modules From 544d7ceaaf43defa786818859d0f2c95ed467b2c Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 15:08:22 +0200 Subject: [PATCH 077/218] Install correct yarn version > ERROR: There are no scenarios; must have at least one. https://stackoverflow.com/questions/53471063/yarn-error-there-are-no-scenarios-must-have-at-least-one --- scripts/install | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 5f3f230..8f2c1dd 100644 --- a/scripts/install +++ b/scripts/install @@ -51,14 +51,21 @@ ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_str #================================================= # Elixir 13 dependency #================================================= +ynh_script_progression --message="Managing special dependencies..." --weight=1 # Bulleyes comes with v1.10 instead of v1.13 that is required ynh_install_extra_app_dependencies --repo="https://packages.erlang-solutions.com/debian bullseye contrib" --package="elixir" --key='https://packages.erlang-solutions.com/debian/erlang_solutions.asc' # exlang-dev -> https://github.com/elixir-lang/ex_doc/pull/1442/files # Debian default package is newer (enough), don't use this custom repo +#================================================= +# Yarn dependency (correct version) +#================================================= + +ynh_install_extra_app_dependencies --repo="https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key='https://dl.yarnpkg.com/debian/pubkey.gpg' + #================================================= # Just dependency #================================================= -ynh_script_progression --message="Managing special dependencies..." --weight=1 + ### Add just dependency # TODO : this is unsafe and should be dealt with in a better way. # There is currently no proper way to install it simply on Debian 11 https://github.com/casey/just#packages From 57e50c015acd06959dcac17c59799c1ab74ba54d Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 15:09:00 +0200 Subject: [PATCH 078/218] remove yarn and npm (bad version) --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 2a0efb2..171f1cb 100644 --- a/manifest.toml +++ b/manifest.toml @@ -102,7 +102,7 @@ ram.runtime = "500M" main.url = "/" [resources.apt] - packages = "postgresql elixir erlang-dev erlang-parsetools yarn npm" + packages = "postgresql elixir erlang-dev erlang-parsetools" [resources.database] type = "postgresql" From 9e8b88caf9a6d6ed0ed72c810de4c05896b58c65 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 15:15:15 +0200 Subject: [PATCH 079/218] bring back npm --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 171f1cb..62290a2 100644 --- a/manifest.toml +++ b/manifest.toml @@ -102,7 +102,7 @@ ram.runtime = "500M" main.url = "/" [resources.apt] - packages = "postgresql elixir erlang-dev erlang-parsetools" + packages = "postgresql elixir erlang-dev erlang-parsetools npm" [resources.database] type = "postgresql" From fd01be5331dd6c7598701c2b67e73146d42016d6 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 15:15:54 +0200 Subject: [PATCH 080/218] remove some logging --- scripts/install | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/install b/scripts/install index 8f2c1dd..89645d8 100644 --- a/scripts/install +++ b/scripts/install @@ -91,8 +91,6 @@ ynh_exec_warn_less cat .env # Building the release #================================================= ynh_script_progression --message="Building Bonfire release..." --weight=1 -ynh_exec_warn env -ynh_exec_warn ls -l /etc/terminfo export TERM=linux # why is that not defined ? export TERMINFO=/etc/terminfo ynh_exec_warn just rel-build # node needs (root) access to /usr/local/lib/node_modules From 9e60baaab6c6f48242e50f865c59ec030beb0394 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 18:27:23 +0200 Subject: [PATCH 081/218] remove npm global install --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 62290a2..171f1cb 100644 --- a/manifest.toml +++ b/manifest.toml @@ -102,7 +102,7 @@ ram.runtime = "500M" main.url = "/" [resources.apt] - packages = "postgresql elixir erlang-dev erlang-parsetools npm" + packages = "postgresql elixir erlang-dev erlang-parsetools" [resources.database] type = "postgresql" From c16b1e1a532c2a3e86465da5f26fa562a22e7edf Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 18:31:22 +0200 Subject: [PATCH 082/218] use ynh_npm --- scripts/install | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 89645d8..ad4b3d4 100644 --- a/scripts/install +++ b/scripts/install @@ -9,6 +9,9 @@ source _common.sh source /usr/share/yunohost/helpers +ynh_install_nodejs +ynh_use_nodejs + secret_key_base=$(ynh_string_random --length=24) signing_salt=$(ynh_string_random --length=24) encryption_salt=$(ynh_string_random --length=24) @@ -93,7 +96,8 @@ ynh_exec_warn_less cat .env ynh_script_progression --message="Building Bonfire release..." --weight=1 export TERM=linux # why is that not defined ? export TERMINFO=/etc/terminfo -ynh_exec_warn just rel-build # node needs (root) access to /usr/local/lib/node_modules +ynh_exec_warn ynh_exec_as $app $ynh_node_load_PATH -s $SHELL -lc "just rel-build" +#ynh_exec_warn just rel-build # node needs (root) access to /usr/local/lib/node_modules ynh_exec_warn ls _build From b0aa28b414f2c0dc9c8d3525c020c5a5aa48acac Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 21:48:38 +0200 Subject: [PATCH 083/218] set a nodejs version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Random one… --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index ad4b3d4..bfbd526 100644 --- a/scripts/install +++ b/scripts/install @@ -9,7 +9,7 @@ source _common.sh source /usr/share/yunohost/helpers -ynh_install_nodejs +ynh_install_nodejs -nodejs_version=16.13.0 ynh_use_nodejs secret_key_base=$(ynh_string_random --length=24) From 44f04a2a0f4f0fe4b80929670184fff37713cde8 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 3 May 2023 21:55:34 +0200 Subject: [PATCH 084/218] typo + comment --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index bfbd526..2fd2055 100644 --- a/scripts/install +++ b/scripts/install @@ -9,7 +9,7 @@ source _common.sh source /usr/share/yunohost/helpers -ynh_install_nodejs -nodejs_version=16.13.0 +ynh_install_nodejs --nodejs_version=16.13.0 # TODO : need to decide of a better version ynh_use_nodejs secret_key_base=$(ynh_string_random --length=24) From e7c4119e7a7ed61335bc1f4f78aad93275b28a36 Mon Sep 17 00:00:00 2001 From: lapineige Date: Thu, 4 May 2023 09:09:18 +0200 Subject: [PATCH 085/218] split mix and just commands --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 2fd2055..918d2db 100644 --- a/scripts/install +++ b/scripts/install @@ -87,7 +87,8 @@ source $install_dir/.env ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "mix local.hex --force just config" # install Hex in non-interractive way +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "mix local.hex --force" # install Hex in non-interractive way +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just config" ynh_exec_warn_less cat .env #================================================= From 2b375f5ab98d612275974c6fe3b69f009365721f Mon Sep 17 00:00:00 2001 From: lapineige Date: Thu, 4 May 2023 09:10:17 +0200 Subject: [PATCH 086/218] bring back npm --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 171f1cb..62290a2 100644 --- a/manifest.toml +++ b/manifest.toml @@ -102,7 +102,7 @@ ram.runtime = "500M" main.url = "/" [resources.apt] - packages = "postgresql elixir erlang-dev erlang-parsetools" + packages = "postgresql elixir erlang-dev erlang-parsetools npm" [resources.database] type = "postgresql" From 4acd10d82a0f75c4589456a4ab3bb2634fec8538 Mon Sep 17 00:00:00 2001 From: lapineige Date: Thu, 4 May 2023 12:14:55 +0200 Subject: [PATCH 087/218] fix syntax CI is stuck https://ci-apps-dev.yunohost.org/ci/job/7102 --- scripts/install | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 918d2db..e6a552c 100644 --- a/scripts/install +++ b/scripts/install @@ -87,8 +87,7 @@ source $install_dir/.env ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "mix local.hex --force" # install Hex in non-interractive way -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just config" +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "mix local.hex --force && just config" # install Hex in non-interractive way ynh_exec_warn_less cat .env #================================================= From 612eb43bbf397d50443f134276ebcd24fd25189b Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 6 May 2023 23:01:13 +0200 Subject: [PATCH 088/218] =?UTF-8?q?what=20if=20it's=20root=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index e6a552c..829f4a6 100644 --- a/scripts/install +++ b/scripts/install @@ -87,7 +87,7 @@ source $install_dir/.env ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "mix local.hex --force && just config" # install Hex in non-interractive way +ynh_exec_warn "mix local.hex --force && just config" # install Hex in non-interractive way ynh_exec_warn_less cat .env #================================================= From 300ff59464179c220e40e93609e9cee30fe60ce0 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 6 May 2023 23:42:50 +0200 Subject: [PATCH 089/218] revert --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 829f4a6..b25f23c 100644 --- a/scripts/install +++ b/scripts/install @@ -87,7 +87,7 @@ source $install_dir/.env ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir -ynh_exec_warn "mix local.hex --force && just config" # install Hex in non-interractive way +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "mix local.hex --force && just config" # install Hex in non-interractive way ynh_exec_warn_less cat .env #================================================= From 2d4d0014a2876ba2aa3f71a11500db7dfd859784 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 6 May 2023 23:55:04 +0200 Subject: [PATCH 090/218] split again --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index b25f23c..f6af629 100644 --- a/scripts/install +++ b/scripts/install @@ -87,7 +87,8 @@ source $install_dir/.env ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "mix local.hex --force && just config" # install Hex in non-interractive way +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "mix local.hex --force" +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just config" # install Hex in non-interractive way ynh_exec_warn_less cat .env #================================================= From ad958346d8a8f799bd6dc1d699b69c2712e8ed95 Mon Sep 17 00:00:00 2001 From: lapineige Date: Fri, 11 Aug 2023 11:06:06 +0200 Subject: [PATCH 091/218] 0.9.6 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 62290a2..3d62e42 100644 --- a/manifest.toml +++ b/manifest.toml @@ -3,7 +3,7 @@ packaging_format = 2 id = "bonfire" name = "Bonfire" -version = "0.9.0-beta10~ynh2" +version = "0.9.6-beta~ynh1" maintainers = ["Lapineige"] @@ -89,8 +89,8 @@ ram.runtime = "500M" [resources.sources] [resources.sources.main] - url = "https://github.com/bonfire-networks/bonfire-app/archive/e2f382587f2cf14d5f469216dc72bea0064f667b.tar.gz" - sha256 = "de932fd77f8b721191554df0c0e4aeae6b2f222c7c9ea087fa1ddec8d35e3193" + url = "https://github.com/bonfire-networks/bonfire-app/archive/d5a159a576937e71d71db4d0ceda840b3d303f5d.tar.gz" + sha256 = "0f31287b7005f6f58ebeff8cae98cea8c442f08d0cd410da67c37b19513697f2" [resources.ports] From 9d570390c4577561dd52a5f0a63560ac8d3fe7d9 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 11 Aug 2023 09:06:09 +0000 Subject: [PATCH 092/218] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 54c51d2..eee514e 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Federated social networking server built on ActivityPub open protocol -**Shipped version:** 0.9.0-beta10~ynh2 +**Shipped version:** 0.9.6-beta~ynh1 **Demo:** https://playground.bonfire.cafe/ ## Documentation and resources diff --git a/README_fr.md b/README_fr.md index 830d763..5a252a1 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Serveur de réseautage social fédéré basé sur le protocole ouvert ActivityPub -**Version incluse :** 0.9.0-beta10~ynh2 +**Version incluse :** 0.9.6-beta~ynh1 **Démo :** https://playground.bonfire.cafe/ ## Documentations et ressources From dd9c870dfa1ba0ac845d6063c7646269a5957d88 Mon Sep 17 00:00:00 2001 From: lapineige Date: Fri, 11 Aug 2023 11:15:19 +0200 Subject: [PATCH 093/218] clearer version name --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 3d62e42..087e140 100644 --- a/manifest.toml +++ b/manifest.toml @@ -3,7 +3,7 @@ packaging_format = 2 id = "bonfire" name = "Bonfire" -version = "0.9.6-beta~ynh1" +version = "0.9.6-classic-beta.2~ynh1" maintainers = ["Lapineige"] From 5ceb82877a5eea47eea68f11da1a970c33154807 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 11 Aug 2023 09:15:22 +0000 Subject: [PATCH 094/218] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index eee514e..8576ab5 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Federated social networking server built on ActivityPub open protocol -**Shipped version:** 0.9.6-beta~ynh1 +**Shipped version:** 0.9.6-classic-beta.2~ynh1 **Demo:** https://playground.bonfire.cafe/ ## Documentation and resources diff --git a/README_fr.md b/README_fr.md index 5a252a1..ac2a9c6 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Serveur de réseautage social fédéré basé sur le protocole ouvert ActivityPub -**Version incluse :** 0.9.6-beta~ynh1 +**Version incluse :** 0.9.6-classic-beta.2~ynh1 **Démo :** https://playground.bonfire.cafe/ ## Documentations et ressources From 0c7064d376702c3bd741cccbbfc0661715aff7fb Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 12 Aug 2023 12:54:59 +0200 Subject: [PATCH 095/218] Update elixir version to v1.15 https://github.com/bonfire-networks/bonfire-app/commit/20707e8fa07e8ccd3e4a3a9c2ad549b378f8f508 https://github.com/bonfire-networks/bonfire-app/blob/main/docs/DEPLOY.md#dependencies --- scripts/install | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index f6af629..f107f8d 100644 --- a/scripts/install +++ b/scripts/install @@ -52,11 +52,16 @@ ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_str #================================================= # SPECIFIC SETUP #================================================= -# Elixir 13 dependency +# Elixir 15 dependency #================================================= ynh_script_progression --message="Managing special dependencies..." --weight=1 -# Bulleyes comes with v1.10 instead of v1.13 that is required -ynh_install_extra_app_dependencies --repo="https://packages.erlang-solutions.com/debian bullseye contrib" --package="elixir" --key='https://packages.erlang-solutions.com/debian/erlang_solutions.asc' +# Bulleyes comes with v1.10 instead of v1.15 that is required +# ynh_install_extra_app_dependencies --repo="https://packages.erlang-solutions.com/debian bullseye contrib" --package="elixir-lang" --key='https://packages.erlang-solutions.com/debian/erlang_solutions.asc' +# v15 is not available in default repo. RabbitMQ repo should be used (https://elixir-lang.org/install.html). No debian simple syntax. TODO later, using the simple syntax for now +add-apt-repository ppa:rabbitmq/rabbitmq-erlang -y # erlang 26 +apt update +apt install elixir # v1.15 + # exlang-dev -> https://github.com/elixir-lang/ex_doc/pull/1442/files # Debian default package is newer (enough), don't use this custom repo #================================================= From 5812be156646fa512d766b211082b689c689f9ec Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 12 Aug 2023 13:00:26 +0200 Subject: [PATCH 096/218] debug --- scripts/install | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index f107f8d..44d871c 100644 --- a/scripts/install +++ b/scripts/install @@ -87,13 +87,24 @@ ynh_install_extra_app_dependencies --repo="https://proget.makedeb.org prebuilt-m #makedeb -si #cd .. -export WITH_DOCKER=no # or source .env ? +# export WITH_DOCKER=no # or source .env ? # Using this for now source $install_dir/.env +# TODO Debug +ynh_exec_warn_less echo 'Debug install dir ENV file' +ynh_exec_warn_less cat $install_dir/.env +ynh_exec_warn_less echo 'Debug local ENV file' +ynh_exec_warn_less cat .env + ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "mix local.hex --force" ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just config" # install Hex in non-interractive way + +# TODO Debug +ynh_exec_warn_less echo 'Debug install dir ENV file' +ynh_exec_warn_less cat $install_dir/.env +ynh_exec_warn_less echo 'Debug local ENV file' ynh_exec_warn_less cat .env #================================================= From eb126eb7f9aead33e8a43d2af38aee1de14aa99f Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 12 Aug 2023 13:08:17 +0200 Subject: [PATCH 097/218] fix media_upload_size extraction --- scripts/install | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 44d871c..b67e314 100644 --- a/scripts/install +++ b/scripts/install @@ -46,7 +46,10 @@ chmod 400 "$install_dir/.env" chown $app:$app "$install_dir/.env" # max file upload size -MEDIA_UPLOAD_SIZE="${media_upload_size:0:2}000000" # convert the MB argument in bytes +MEDIA_UPLOAD_SIZE="${media_upload_size//[!0-9]/}000000" + +"${media_upload_size:0:2}000000" # convert the MB argument in bytes +STRING="5MB,10MB"; echo ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_string="UPLOAD_LIMIT=$MEDIA_UPLOAD_SIZE" --target_file="$install_dir/.env" #================================================= From 64c11ca35f55d76362cc7cc563964041877047a5 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 12 Aug 2023 13:12:52 +0200 Subject: [PATCH 098/218] fix elixir 1.15 syntax --- scripts/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index b67e314..61d4c94 100644 --- a/scripts/install +++ b/scripts/install @@ -61,9 +61,9 @@ ynh_script_progression --message="Managing special dependencies..." --weight=1 # Bulleyes comes with v1.10 instead of v1.15 that is required # ynh_install_extra_app_dependencies --repo="https://packages.erlang-solutions.com/debian bullseye contrib" --package="elixir-lang" --key='https://packages.erlang-solutions.com/debian/erlang_solutions.asc' # v15 is not available in default repo. RabbitMQ repo should be used (https://elixir-lang.org/install.html). No debian simple syntax. TODO later, using the simple syntax for now -add-apt-repository ppa:rabbitmq/rabbitmq-erlang -y # erlang 26 -apt update -apt install elixir # v1.15 + +ynh_install_extra_app_dependencies --repo="https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu/ jammy main" --package="elixir-lang" --key='https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xb279943d2a549531e144b875f77f1eda57ebb1cc' +# erlang 26, for elixir v1.15 # exlang-dev -> https://github.com/elixir-lang/ex_doc/pull/1442/files # Debian default package is newer (enough), don't use this custom repo From 4eecff3c107afd3f6d222150e3678ff18c5e8afa Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 12 Aug 2023 13:16:23 +0200 Subject: [PATCH 099/218] cleaning --- scripts/install | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/install b/scripts/install index 61d4c94..d1e39e8 100644 --- a/scripts/install +++ b/scripts/install @@ -47,9 +47,6 @@ chown $app:$app "$install_dir/.env" # max file upload size MEDIA_UPLOAD_SIZE="${media_upload_size//[!0-9]/}000000" - -"${media_upload_size:0:2}000000" # convert the MB argument in bytes -STRING="5MB,10MB"; echo ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_string="UPLOAD_LIMIT=$MEDIA_UPLOAD_SIZE" --target_file="$install_dir/.env" #================================================= From c289becbe58e5e7592a67ab67c6a81ebf0942ff1 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 12 Aug 2023 13:31:26 +0200 Subject: [PATCH 100/218] migrating to proper packaging v2 for app extra --- scripts/install | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/scripts/install b/scripts/install index d1e39e8..42dc190 100644 --- a/scripts/install +++ b/scripts/install @@ -52,40 +52,7 @@ ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_str #================================================= # SPECIFIC SETUP #================================================= -# Elixir 15 dependency -#================================================= -ynh_script_progression --message="Managing special dependencies..." --weight=1 -# Bulleyes comes with v1.10 instead of v1.15 that is required -# ynh_install_extra_app_dependencies --repo="https://packages.erlang-solutions.com/debian bullseye contrib" --package="elixir-lang" --key='https://packages.erlang-solutions.com/debian/erlang_solutions.asc' -# v15 is not available in default repo. RabbitMQ repo should be used (https://elixir-lang.org/install.html). No debian simple syntax. TODO later, using the simple syntax for now -ynh_install_extra_app_dependencies --repo="https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu/ jammy main" --package="elixir-lang" --key='https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xb279943d2a549531e144b875f77f1eda57ebb1cc' -# erlang 26, for elixir v1.15 - -# exlang-dev -> https://github.com/elixir-lang/ex_doc/pull/1442/files # Debian default package is newer (enough), don't use this custom repo - -#================================================= -# Yarn dependency (correct version) -#================================================= - -ynh_install_extra_app_dependencies --repo="https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key='https://dl.yarnpkg.com/debian/pubkey.gpg' - -#================================================= -# Just dependency -#================================================= - -### Add just dependency -# TODO : this is unsafe and should be dealt with in a better way. -# There is currently no proper way to install it simply on Debian 11 https://github.com/casey/just#packages - -# only works for x86, we need to switch to the other option with makedeb package ? -ynh_install_extra_app_dependencies --repo="https://proget.makedeb.org prebuilt-mpr bullseye" --package="just" --key='https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' - -#ynh_exec_warn_less ynh_install_extra_app_dependencies --repo="https://proget.makedeb.org makedeb main" --package="makedeb" --key='https://proget.makedeb.org/debian-feeds/makedeb.pub' -#git clone 'https://mpr.makedeb.org/just' -#cd just -#makedeb -si -#cd .. # export WITH_DOCKER=no # or source .env ? # Using this for now source $install_dir/.env From 5dc00275c3f4cfd81b95f594debc3f1d20d400cb Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 12 Aug 2023 13:37:26 +0200 Subject: [PATCH 101/218] migrating to proper packaging v2 for app extra --- manifest.toml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/manifest.toml b/manifest.toml index 087e140..50546e5 100644 --- a/manifest.toml +++ b/manifest.toml @@ -104,5 +104,31 @@ ram.runtime = "500M" [resources.apt] packages = "postgresql elixir erlang-dev erlang-parsetools npm" + ##### (this part is optional and corresponds to the legacy ynh_install_extra_app_dependencies helper) + + ### Yarn dependency (correct version) + extras.yarn.repo = "deb https://dl.yarnpkg.com/debian/ stable main" + extras.yarn.key = "https://dl.yarnpkg.com/debian/pubkey.gpg" + extras.yarn.packages = ["yarn"] + + ### Elixir 15 dependency + ynh_script_progression --message="Managing special dependencies..." --weight=1 + # Bulleyes comes with v1.10 instead of v1.15 that is required + # ynh_install_extra_app_dependencies --repo="https://packages.erlang-solutions.com/debian bullseye contrib" --package="elixir-lang" --key='https://packages.erlang-solutions.com/debian/erlang_solutions.asc' + # v15 is not available in default repo. RabbitMQ repo should be used (https://elixir-lang.org/install.html). No debian simple syntax. TODO later, using the simple syntax for now + # erlang 26, for elixir v1.15 + extras.elixir.repo = "deb https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu jammy main" + extras.elixir.key = "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xb279943d2a549531e144b875f77f1eda57ebb1cc" + extras.elixir.packages = ["elixir-lang"] + # exlang-dev -> https://github.com/elixir-lang/ex_doc/pull/1442/files # Debian default package is newer (enough), don't use this custom repo + + ### just dependency + # TODO : this is unsafe and should be dealt with in a better way. + # There is currently no proper way to install it simply on Debian 11 https://github.com/casey/just#packages + # only works for x86, we need to switch to the other option with makedeb package ? + extras.just.repo = "deb https://proget.makedeb.org prebuilt-mpr bullseye" + extras.just.key = "https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub" + extras.just.packages = ["just"] + [resources.database] type = "postgresql" From 6ff6f7ca48ce32b198b927421621033bcc29fbeb Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 12 Aug 2023 13:42:48 +0200 Subject: [PATCH 102/218] cleaning --- manifest.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 50546e5..b74c843 100644 --- a/manifest.toml +++ b/manifest.toml @@ -112,7 +112,6 @@ ram.runtime = "500M" extras.yarn.packages = ["yarn"] ### Elixir 15 dependency - ynh_script_progression --message="Managing special dependencies..." --weight=1 # Bulleyes comes with v1.10 instead of v1.15 that is required # ynh_install_extra_app_dependencies --repo="https://packages.erlang-solutions.com/debian bullseye contrib" --package="elixir-lang" --key='https://packages.erlang-solutions.com/debian/erlang_solutions.asc' # v15 is not available in default repo. RabbitMQ repo should be used (https://elixir-lang.org/install.html). No debian simple syntax. TODO later, using the simple syntax for now From cf94851461f1e67a18f737bf05828c32a1709820 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 12 Aug 2023 13:50:13 +0200 Subject: [PATCH 103/218] ask instead of help --- manifest.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.toml b/manifest.toml index b74c843..d4565a2 100644 --- a/manifest.toml +++ b/manifest.toml @@ -46,8 +46,8 @@ ram.runtime = "500M" default = "visitors" [install.language] - help.en = "Choose the application language" - help.fr = "Choisissez la langue de l'application" + ask.en = "Choose the application language" + ask.fr = "Choisissez la langue de l'application" type = "string" choices = ["fr", "en"] default = "fr" @@ -76,8 +76,8 @@ ram.runtime = "500M" "150MB" ] default = "35MB" - help.en = "Maximum size of the media uploaded. Can be changed later." - help.fr = "Taille maximale des médias mis en ligne. Peut-être modifié ultérieurement." + ask.en = "Maximum size of the media uploaded. Can be changed later." + ask.fr = "Taille maximale des médias mis en ligne. Peut-être modifié ultérieurement." [resources] From c889f5498f96b82c8b9d7ed7374216502c6d5419 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 12 Aug 2023 13:51:34 +0200 Subject: [PATCH 104/218] use correct type --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index d4565a2..4d63dd6 100644 --- a/manifest.toml +++ b/manifest.toml @@ -61,7 +61,7 @@ ram.runtime = "500M" type = "password" [install.media_upload_size] - type = "string" + type = "select" choices = [ "1MB", "2MB", From 92b12274a301384430335ff9296c95240884ad32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 12 Aug 2023 13:52:50 +0200 Subject: [PATCH 105/218] Fix linter --- manifest.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.toml b/manifest.toml index b74c843..5f66c1d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -46,8 +46,8 @@ ram.runtime = "500M" default = "visitors" [install.language] - help.en = "Choose the application language" - help.fr = "Choisissez la langue de l'application" + ask.en = "Choose the application language" + ask.fr = "Choisissez la langue de l'application" type = "string" choices = ["fr", "en"] default = "fr" @@ -61,6 +61,8 @@ ram.runtime = "500M" type = "password" [install.media_upload_size] + ask.en = "Choose the maximum size of the media uploaded. Can be changed later." + ask.fr = "Choisissez la taille maximale des médias mis en ligne. Peut-être modifié ultérieurement." type = "string" choices = [ "1MB", @@ -76,8 +78,6 @@ ram.runtime = "500M" "150MB" ] default = "35MB" - help.en = "Maximum size of the media uploaded. Can be changed later." - help.fr = "Taille maximale des médias mis en ligne. Peut-être modifié ultérieurement." [resources] From 34976895e0360305434850569cc856e9e6503e8b Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 12 Aug 2023 14:01:15 +0200 Subject: [PATCH 106/218] use elixir --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 83e7ea1..b6bd323 100644 --- a/manifest.toml +++ b/manifest.toml @@ -118,7 +118,7 @@ ram.runtime = "500M" # erlang 26, for elixir v1.15 extras.elixir.repo = "deb https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu jammy main" extras.elixir.key = "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xb279943d2a549531e144b875f77f1eda57ebb1cc" - extras.elixir.packages = ["elixir-lang"] + extras.elixir.packages = ["elixir"] # exlang-dev -> https://github.com/elixir-lang/ex_doc/pull/1442/files # Debian default package is newer (enough), don't use this custom repo ### just dependency From 9245c8fc106c4173980598afa4e9c5ede3528ba2 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 12 Aug 2023 17:10:24 +0200 Subject: [PATCH 107/218] remove doubles in dependancy --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index b6bd323..0e754b9 100644 --- a/manifest.toml +++ b/manifest.toml @@ -102,7 +102,7 @@ ram.runtime = "500M" main.url = "/" [resources.apt] - packages = "postgresql elixir erlang-dev erlang-parsetools npm" + packages = "postgresql npm" ##### (this part is optional and corresponds to the legacy ynh_install_extra_app_dependencies helper) From 8ff5beb7020b7e1693eb075b282866e2ad5d6fca Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 12 Aug 2023 17:23:57 +0200 Subject: [PATCH 108/218] test for elixir --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 0e754b9..4de59a0 100644 --- a/manifest.toml +++ b/manifest.toml @@ -118,7 +118,7 @@ ram.runtime = "500M" # erlang 26, for elixir v1.15 extras.elixir.repo = "deb https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu jammy main" extras.elixir.key = "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xb279943d2a549531e144b875f77f1eda57ebb1cc" - extras.elixir.packages = ["elixir"] + extras.elixir.packages = ["elixir-lang"] # exlang-dev -> https://github.com/elixir-lang/ex_doc/pull/1442/files # Debian default package is newer (enough), don't use this custom repo ### just dependency From 7bee532625af5cd0b25258f97faea9fe4b36f19c Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 10:49:36 +0200 Subject: [PATCH 109/218] 0.9.6-beta.3 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 4de59a0..8b4830c 100644 --- a/manifest.toml +++ b/manifest.toml @@ -3,7 +3,7 @@ packaging_format = 2 id = "bonfire" name = "Bonfire" -version = "0.9.6-classic-beta.2~ynh1" +version = "0.9.6~ynh3" maintainers = ["Lapineige"] @@ -89,8 +89,8 @@ ram.runtime = "500M" [resources.sources] [resources.sources.main] - url = "https://github.com/bonfire-networks/bonfire-app/archive/d5a159a576937e71d71db4d0ceda840b3d303f5d.tar.gz" - sha256 = "0f31287b7005f6f58ebeff8cae98cea8c442f08d0cd410da67c37b19513697f2" + url = "https://github.com/bonfire-networks/bonfire-app/archive/refs/tags/v0.9.6-beta.3.tar.gz" + sha256 = "9ba0701bf7c4f30b155b2b18119744c1e7efb49cbf67fe3084675a964196d4a9" [resources.ports] From 080819d33b1e17b37dac83f3f89ab96c24610783 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 13 Aug 2023 08:49:39 +0000 Subject: [PATCH 110/218] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8576ab5..3e15def 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Federated social networking server built on ActivityPub open protocol -**Shipped version:** 0.9.6-classic-beta.2~ynh1 +**Shipped version:** 0.9.6~ynh3 **Demo:** https://playground.bonfire.cafe/ ## Documentation and resources diff --git a/README_fr.md b/README_fr.md index ac2a9c6..877802d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Serveur de réseautage social fédéré basé sur le protocole ouvert ActivityPub -**Version incluse :** 0.9.6-classic-beta.2~ynh1 +**Version incluse :** 0.9.6~ynh3 **Démo :** https://playground.bonfire.cafe/ ## Documentations et ressources From 3bfb02f788605331bc5126f213e5f0487966674c Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 10:54:30 +0200 Subject: [PATCH 111/218] Elixir 13 --- manifest.toml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/manifest.toml b/manifest.toml index 8b4830c..727860c 100644 --- a/manifest.toml +++ b/manifest.toml @@ -110,15 +110,20 @@ ram.runtime = "500M" extras.yarn.repo = "deb https://dl.yarnpkg.com/debian/ stable main" extras.yarn.key = "https://dl.yarnpkg.com/debian/pubkey.gpg" extras.yarn.packages = ["yarn"] - + + + ### Elixir 13 dependency - instead of v15 for now + extras.elixir13.repo = "deb https://packages.erlang-solutions.com/debian bullseye contrib" + extras.elixir13.key = "https://packages.erlang-solutions.com/debian/erlang_solutions.asc" + extras.elixir13.packages = ["elixir-lang"] ### Elixir 15 dependency # Bulleyes comes with v1.10 instead of v1.15 that is required # ynh_install_extra_app_dependencies --repo="https://packages.erlang-solutions.com/debian bullseye contrib" --package="elixir-lang" --key='https://packages.erlang-solutions.com/debian/erlang_solutions.asc' # v15 is not available in default repo. RabbitMQ repo should be used (https://elixir-lang.org/install.html). No debian simple syntax. TODO later, using the simple syntax for now # erlang 26, for elixir v1.15 - extras.elixir.repo = "deb https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu jammy main" - extras.elixir.key = "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xb279943d2a549531e144b875f77f1eda57ebb1cc" - extras.elixir.packages = ["elixir-lang"] + #extras.elixir15.repo = "deb https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu jammy main" + #extras.elixir15.key = "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xb279943d2a549531e144b875f77f1eda57ebb1cc" + #extras.elixir15.packages = ["elixir-lang"] # exlang-dev -> https://github.com/elixir-lang/ex_doc/pull/1442/files # Debian default package is newer (enough), don't use this custom repo ### just dependency From cc140296e9bdae7d713a5bec425034e0dd604869 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 10:59:18 +0200 Subject: [PATCH 112/218] fix elixir package name --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 727860c..d0cf301 100644 --- a/manifest.toml +++ b/manifest.toml @@ -115,7 +115,7 @@ ram.runtime = "500M" ### Elixir 13 dependency - instead of v15 for now extras.elixir13.repo = "deb https://packages.erlang-solutions.com/debian bullseye contrib" extras.elixir13.key = "https://packages.erlang-solutions.com/debian/erlang_solutions.asc" - extras.elixir13.packages = ["elixir-lang"] + extras.elixir13.packages = ["elixir"] ### Elixir 15 dependency # Bulleyes comes with v1.10 instead of v1.15 that is required # ynh_install_extra_app_dependencies --repo="https://packages.erlang-solutions.com/debian bullseye contrib" --package="elixir-lang" --key='https://packages.erlang-solutions.com/debian/erlang_solutions.asc' From f98f47177bc70c697ba85f77f05e8c7b6ea345dc Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 11:15:41 +0200 Subject: [PATCH 113/218] debug --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index 42dc190..54d5a27 100644 --- a/scripts/install +++ b/scripts/install @@ -58,6 +58,8 @@ ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_str source $install_dir/.env # TODO Debug +ynh_exec_warn_less pwd +ynh_exec_warn_less ls -al ynh_exec_warn_less echo 'Debug install dir ENV file' ynh_exec_warn_less cat $install_dir/.env ynh_exec_warn_less echo 'Debug local ENV file' From 92361263c6ebd5c3bd97351f7e44dea260d03774 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 11:21:45 +0200 Subject: [PATCH 114/218] debug --- scripts/install | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index 54d5a27..b842a61 100644 --- a/scripts/install +++ b/scripts/install @@ -58,12 +58,8 @@ ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_str source $install_dir/.env # TODO Debug -ynh_exec_warn_less pwd -ynh_exec_warn_less ls -al ynh_exec_warn_less echo 'Debug install dir ENV file' ynh_exec_warn_less cat $install_dir/.env -ynh_exec_warn_less echo 'Debug local ENV file' -ynh_exec_warn_less cat .env ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir @@ -73,8 +69,6 @@ ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just config" # install Hex in non- # TODO Debug ynh_exec_warn_less echo 'Debug install dir ENV file' ynh_exec_warn_less cat $install_dir/.env -ynh_exec_warn_less echo 'Debug local ENV file' -ynh_exec_warn_less cat .env #================================================= # Building the release @@ -85,6 +79,7 @@ export TERMINFO=/etc/terminfo ynh_exec_warn ynh_exec_as $app $ynh_node_load_PATH -s $SHELL -lc "just rel-build" #ynh_exec_warn just rel-build # node needs (root) access to /usr/local/lib/node_modules +ynh_exec_warn ls -a ynh_exec_warn ls _build #================================================= From fbe0f94ffcde4cd148fd9a256771a0d2a6082a59 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 11:37:24 +0200 Subject: [PATCH 115/218] don't use docker --- scripts/install | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index b842a61..3213613 100644 --- a/scripts/install +++ b/scripts/install @@ -53,22 +53,22 @@ ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_str # SPECIFIC SETUP #================================================= - -# export WITH_DOCKER=no # or source .env ? # Using this for now source $install_dir/.env +export WITH_DOCKER=no # or source .env ? # Using this for now # TODO Debug -ynh_exec_warn_less echo 'Debug install dir ENV file' -ynh_exec_warn_less cat $install_dir/.env +ynh_exec_warn echo 'Debug install dir ENV file' +ynh_exec_warn cat $install_dir/.env ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "mix local.hex --force" ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just config" # install Hex in non-interractive way +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just mix bonfire.deps .update" # TODO Debug -ynh_exec_warn_less echo 'Debug install dir ENV file' -ynh_exec_warn_less cat $install_dir/.env +ynh_exec_warn echo 'Debug install dir ENV file' +ynh_exec_warn cat $install_dir/.env #================================================= # Building the release From 5485c155a6f4215301dab70bf88a76e0bdea4955 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 11:42:25 +0200 Subject: [PATCH 116/218] fix WITH_DOCKER syntax --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 3213613..aaca8d5 100644 --- a/scripts/install +++ b/scripts/install @@ -54,7 +54,7 @@ ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_str #================================================= source $install_dir/.env -export WITH_DOCKER=no # or source .env ? # Using this for now +export WITH_DOCKER="no" # or source .env ? # Using this for now # TODO Debug ynh_exec_warn echo 'Debug install dir ENV file' From c535aba287dca9cfaedf75df91854b242ce8d631 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 12:00:00 +0200 Subject: [PATCH 117/218] debug and cleaning --- scripts/install | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index aaca8d5..a4ef3c9 100644 --- a/scripts/install +++ b/scripts/install @@ -58,13 +58,14 @@ export WITH_DOCKER="no" # or source .env ? # Using this for now # TODO Debug ynh_exec_warn echo 'Debug install dir ENV file' +ynh_exec_warn ls ./config/prod/ ynh_exec_warn cat $install_dir/.env ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "mix local.hex --force" -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just config" # install Hex in non-interractive way -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just mix bonfire.deps .update" +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "mix local.hex --force" # install Hex in non-interractive way +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just config" +#ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just mix bonfire.deps .update" # TODO Debug ynh_exec_warn echo 'Debug install dir ENV file' From 63ebd1ab976ff900f97613524c30176498751a4b Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 12:11:01 +0200 Subject: [PATCH 118/218] =?UTF-8?q?don't=20use=20docker=20for=20real?= =?UTF-8?q?=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/install | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/install b/scripts/install index a4ef3c9..4766c6c 100644 --- a/scripts/install +++ b/scripts/install @@ -54,7 +54,7 @@ ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_str #================================================= source $install_dir/.env -export WITH_DOCKER="no" # or source .env ? # Using this for now +export WITH_DOCKER=no # or source .env ? # Using this for now # TODO Debug ynh_exec_warn echo 'Debug install dir ENV file' @@ -63,9 +63,9 @@ ynh_exec_warn cat $install_dir/.env ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "mix local.hex --force" # install Hex in non-interractive way -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just config" -#ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just mix bonfire.deps .update" +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no mix local.hex --force" # install Hex in non-interractive way +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just config" +#ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just mix bonfire.deps .update" # TODO Debug ynh_exec_warn echo 'Debug install dir ENV file' @@ -77,7 +77,7 @@ ynh_exec_warn cat $install_dir/.env ynh_script_progression --message="Building Bonfire release..." --weight=1 export TERM=linux # why is that not defined ? export TERMINFO=/etc/terminfo -ynh_exec_warn ynh_exec_as $app $ynh_node_load_PATH -s $SHELL -lc "just rel-build" +ynh_exec_warn ynh_exec_as $app $ynh_node_load_PATH -s $SHELL -lc "WITH_DOCKER=no just rel-build" #ynh_exec_warn just rel-build # node needs (root) access to /usr/local/lib/node_modules ynh_exec_warn ls -a @@ -90,14 +90,14 @@ release_folder="_build/prod/rel/bonfire" ynh_script_progression --message="Running database migrations..." --weight=1 # Database created before, let's run the migrations -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()'" +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just cmd $release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()'" ynh_script_progression --message="Starting Bonfire..." --weight=1 -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire start" +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just cmd $release_folder/bin/bonfire start" # start bonfire as a daemon ynh_script_progression --message="Starting Bonfire daemon..." --weight=1 -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just cmd $release_folder/bin/bonfire start daemon" +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just cmd $release_folder/bin/bonfire start daemon" #================================================= # END OF SCRIPT From b3f6882bf34fe5e21274623398cc30dcf80022d6 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 12:39:22 +0200 Subject: [PATCH 119/218] upgrade to latest release : add just-config-basic --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index d0cf301..58b68cd 100644 --- a/manifest.toml +++ b/manifest.toml @@ -89,8 +89,8 @@ ram.runtime = "500M" [resources.sources] [resources.sources.main] - url = "https://github.com/bonfire-networks/bonfire-app/archive/refs/tags/v0.9.6-beta.3.tar.gz" - sha256 = "9ba0701bf7c4f30b155b2b18119744c1e7efb49cbf67fe3084675a964196d4a9" + url = "https://github.com/bonfire-networks/bonfire-app/archive/1ee3a102e6ab28e2de663c44ffa0434f46181ba9.tar.gz" + sha256 = "592681c19b59217632eda7dd7e8cd70dc0ce1f7088c6f59f95189fc8c76f48f6" [resources.ports] From 8739cce79fa43d416f8231d1004cf5462b02ed27 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 12:40:56 +0200 Subject: [PATCH 120/218] generate secrets / use docker / .env fix --- scripts/install | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index 4766c6c..c0ccda5 100644 --- a/scripts/install +++ b/scripts/install @@ -49,6 +49,14 @@ chown $app:$app "$install_dir/.env" MEDIA_UPLOAD_SIZE="${media_upload_size//[!0-9]/}000000" ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_string="UPLOAD_LIMIT=$MEDIA_UPLOAD_SIZE" --target_file="$install_dir/.env" +# Secret keys +SECRET_KEY_BASE=$(ynh_string_random) +SIGNING_SALT=$(ynh_string_random) +ENCRYPTION_SALT=$(ynh_string_random) +ynh_replace_string --match_string="__SECRET_KEY_BASE__" --replace_string="$SECRET_KEY_BASE" --target_file="$install_dir/.env" +ynh_replace_string --match_string="__SIGNING_SALT__" --replace_string="$SIGNING_SALT" --target_file="$install_dir/.env" +ynh_replace_string --match_string="__ENCRYPTION_SALT__" --replace_string="$ENCRYPTION_SALT" --target_file="$install_dir/.env" + #================================================= # SPECIFIC SETUP #================================================= @@ -56,15 +64,10 @@ ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_str source $install_dir/.env export WITH_DOCKER=no # or source .env ? # Using this for now -# TODO Debug -ynh_exec_warn echo 'Debug install dir ENV file' -ynh_exec_warn ls ./config/prod/ -ynh_exec_warn cat $install_dir/.env - ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no mix local.hex --force" # install Hex in non-interractive way -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just config" +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just config-basic" #ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just mix bonfire.deps .update" # TODO Debug From 03b1c53c1857aad46b211c05f8b38106e0865cca Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 13:05:57 +0200 Subject: [PATCH 121/218] no npm global install --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index c0ccda5..5af05d8 100644 --- a/scripts/install +++ b/scripts/install @@ -80,6 +80,8 @@ ynh_exec_warn cat $install_dir/.env ynh_script_progression --message="Building Bonfire release..." --weight=1 export TERM=linux # why is that not defined ? export TERMINFO=/etc/terminfo +### DONT USE GLOBAL NPM INSTALL +ynh_replace_string --match_string="npm install --global" --replace_string="npm install" --target_file="$install_dir/justfile" ynh_exec_warn ynh_exec_as $app $ynh_node_load_PATH -s $SHELL -lc "WITH_DOCKER=no just rel-build" #ynh_exec_warn just rel-build # node needs (root) access to /usr/local/lib/node_modules From 0a2296e5f06d8b2b0116791497ede4fdea66b775 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 13:13:29 +0200 Subject: [PATCH 122/218] bump version https://github.com/YunoHost-Apps/bonfire_ynh/pull/2#issuecomment-1676323128 --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 58b68cd..b3d76a2 100644 --- a/manifest.toml +++ b/manifest.toml @@ -89,8 +89,8 @@ ram.runtime = "500M" [resources.sources] [resources.sources.main] - url = "https://github.com/bonfire-networks/bonfire-app/archive/1ee3a102e6ab28e2de663c44ffa0434f46181ba9.tar.gz" - sha256 = "592681c19b59217632eda7dd7e8cd70dc0ce1f7088c6f59f95189fc8c76f48f6" + url = "https://github.com/bonfire-networks/bonfire-app/archive/9641f1e3eb7a303d17759acbe497e54c70cbe4db.tar.gz" + sha256 = "8fade09ebb9f9cace9f8b4bec75ccc3d4a31f65d2240525cdf0c36939e38cbf8" [resources.ports] From ea971ad959901e013b93e0b33501858c06cd4075 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 13:24:08 +0200 Subject: [PATCH 123/218] use yunohost mail config --- manifest.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index b3d76a2..790ed5b 100644 --- a/manifest.toml +++ b/manifest.toml @@ -95,7 +95,8 @@ ram.runtime = "500M" [resources.ports] [resources.system_user] - + allow_email = true + [resources.install_dir] [resources.permissions] From 12007dc6735b3f9922d431397b57803cf7efa76e Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 13:28:41 +0200 Subject: [PATCH 124/218] complete env file --- conf/.env | 82 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 74 insertions(+), 8 deletions(-) diff --git a/conf/.env b/conf/.env index 013c24f..fa36513 100644 --- a/conf/.env +++ b/conf/.env @@ -1,19 +1,85 @@ MIX_ENV=prod FLAVOUR=classic -HOSTNAME=__DOMAIN__ +WITH_DOCKER=no + +## OTHER CONFIG ## +# server domain name: +HOSTNAME=__DOMAIN__ +# server port: +SERVER_PORT=__PORT__ +# port your visitors will access (typically 80 or 443, will be different than SERVER_PORT only if using a reverse proxy) +PUBLIC_PORT=443 +# what service to use for sending out emails (eg. smtp, mailgun, none) NOTE: you should also set the corresponding keys in secrets section +MAIL_BACKEND=sendmail +# hostname and port of meili search index +SEARCH_MEILI_INSTANCE=http://localhost:7700 +# require an email address to be invited before being able to sign up +INVITE_ONLY=true + +# uncomment in order to NOT automatically change the database schema when you upgrade the app +# DISABLE_DB_AUTOMIGRATION=true +# max file upload size (default is 20 meg) +UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE +# ==================================== +# You should not have to edit any of the following ones: +POSTGRES_HOST=localhost +LANG=en_US.UTF-8 +LANGUAGE=en_US.UTF-8 +REPLACE_OS_VARS=true +LIVEVIEW_ENABLED=true +POSTGRES_USER=postgres +POSTGRES_DB=bonfire_db +ACME_AGREE=true +SHOW_DEBUG_IN_DEV=true +# PLUG_SERVER=bandit +## SECRETS ## +# make sure you change everything to your own secrets! +# and do not check this into git or any public host + +# for sessions/cookies, you can generate strings for these by running: just secrets SECRET_KEY_BASE=__SECRET_KEY_BASE__ SIGNING_SALT=__SIGNING_SALT__ ENCRYPTION_SALT=__ENCRYPTION_SALT__ -SERVER_PORT=__PORT__ -PUBLIC_PORT=443 +# database access +POSTGRES_PASSWORD=put_a_secure_db_pw_here + +# password for the search index +MEILI_MASTER_KEY=put-a-key-to-protect-the-search-index-here + +## TODO +# email deliverym if you use mailgun.com, edit with your domain and API key +MAIL_DOMAIN=__DOMAIN__ +MAIL_USERNAME=__APP__ +MAIL_KEY=__MAIL_PWD__ +MAIL_FROM=__APP__@__DOMAIN__ # TODO : Configure S3 - with proper Yunohost question during installation -#UPLOADS_S3_BUCKET= -#UPLOADS_S3_ACCESS_KEY_ID= -#UPLOADS_S3_SECRET_ACCESS_KEY= +# Uploads +# UPLOADS_S3_BUCKET= +# UPLOADS_S3_ACCESS_KEY_ID= +# UPLOADS_S3_SECRET_ACCESS_KEY= -UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE +# telemetry API keys +# SENTRY_DSN= +OTEL_ENABLED=0 +# OTEL_HONEYCOMB_API_KEY= +# OTEL_LIGHTSEP_API_KEY= -WITH_DOCKER=no +# default admin user if you generate seed data +SEEDS_USER=root + +# backend stuff +ERLANG_COOKIE=bonfire_cookie + +# Bonfire extensions configs +WEB_PUSH_SUBJECT=mailto:__APP__@__DOMAIN__ +WEB_PUSH_PUBLIC_KEY= +WEB_PUSH_PRIVATE_KEY= +GEOLOCATE_OPENCAGEDATA= +MAPBOX_API_KEY=pk.eyJ1IjoibWF5ZWwiLCJhIjoiY2tlMmxzNXF5MGFpaDJ0bzR2M29id2EzOCJ9.QsmjD-zypsE0_wonLGCYlA +GITHUB_TOKEN= +TX_TOKEN= + +## END OF SECRETS ## From 531c7ce1546c3bff890e7e6897efbbf93b4e7d6a Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 14:02:24 +0200 Subject: [PATCH 125/218] cleaning --- scripts/install | 7 ------- 1 file changed, 7 deletions(-) diff --git a/scripts/install b/scripts/install index 5af05d8..9f6c334 100644 --- a/scripts/install +++ b/scripts/install @@ -70,10 +70,6 @@ ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no mix local.hex --for ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just config-basic" #ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just mix bonfire.deps .update" -# TODO Debug -ynh_exec_warn echo 'Debug install dir ENV file' -ynh_exec_warn cat $install_dir/.env - #================================================= # Building the release #================================================= @@ -85,9 +81,6 @@ ynh_replace_string --match_string="npm install --global" --replace_string="npm i ynh_exec_warn ynh_exec_as $app $ynh_node_load_PATH -s $SHELL -lc "WITH_DOCKER=no just rel-build" #ynh_exec_warn just rel-build # node needs (root) access to /usr/local/lib/node_modules -ynh_exec_warn ls -a -ynh_exec_warn ls _build - #================================================= # Run the release #================================================= From e8846181714175476121bd5e56ae51ce9c250b58 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 14:04:10 +0200 Subject: [PATCH 126/218] https://github.com/YunoHost-Apps/bonfire_ynh/pull/2#issuecomment-1676335197 --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 790ed5b..60edb75 100644 --- a/manifest.toml +++ b/manifest.toml @@ -89,8 +89,8 @@ ram.runtime = "500M" [resources.sources] [resources.sources.main] - url = "https://github.com/bonfire-networks/bonfire-app/archive/9641f1e3eb7a303d17759acbe497e54c70cbe4db.tar.gz" - sha256 = "8fade09ebb9f9cace9f8b4bec75ccc3d4a31f65d2240525cdf0c36939e38cbf8" + url = "https://github.com/bonfire-networks/bonfire-app/archive/e1ed9da298906d554aee1a56f6290eb2feefc7b1.tar.gz" + sha256 = "18547d839a89f80662cc25416def2d57548183c0afde6c1f2b3e12a0ae89da9c" [resources.ports] From 276cfe8d7b68ee048813f2ce8e5a687f21b1577f Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 16:48:15 +0200 Subject: [PATCH 127/218] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 60edb75..1b13945 100644 --- a/manifest.toml +++ b/manifest.toml @@ -25,7 +25,7 @@ multi_instance = false architectures = "all" ldap = false sso = false -disk = "1000M" +disk = "2000M" ram.build = "300M" ram.runtime = "500M" From 8efc7deaf8bb4bc9a6016c52c08f0f58ee82f1c7 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 16:55:56 +0200 Subject: [PATCH 128/218] Update manifest.toml https://github.com/YunoHost-Apps/bonfire_ynh/pull/2#issuecomment-1676344807 --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 1b13945..70a3a08 100644 --- a/manifest.toml +++ b/manifest.toml @@ -89,8 +89,8 @@ ram.runtime = "500M" [resources.sources] [resources.sources.main] - url = "https://github.com/bonfire-networks/bonfire-app/archive/e1ed9da298906d554aee1a56f6290eb2feefc7b1.tar.gz" - sha256 = "18547d839a89f80662cc25416def2d57548183c0afde6c1f2b3e12a0ae89da9c" + url = "https://github.com/bonfire-networks/bonfire-app/archive/d898a7659bfaf47298998dc4f43b378508eee00e.tar.gz" + sha256 = "0fb2058365f035591833287f91faf43de5aac553db53be314143437f756ae224" [resources.ports] From 245e7040bbdbe71f94e95238f1fb19171b1c1eda Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 17:24:08 +0200 Subject: [PATCH 129/218] add more dependencies --- manifest.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 70a3a08..f546830 100644 --- a/manifest.toml +++ b/manifest.toml @@ -102,8 +102,12 @@ ram.runtime = "500M" [resources.permissions] main.url = "/" + [resources.database] + # This will automatically provision/deprovison a MySQL DB and store the corresponding credentials in settings $db_user, $db_name, $db_pwd + type = "postgresql" + [resources.apt] - packages = "postgresql npm" + packages = "erlang-dev erlang-parsetools postgresql npm" ##### (this part is optional and corresponds to the legacy ynh_install_extra_app_dependencies helper) From ae0da01b5a97d790653e9bd7117010c6c653937e Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 17:27:47 +0200 Subject: [PATCH 130/218] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index f546830..021b84e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -107,7 +107,7 @@ ram.runtime = "500M" type = "postgresql" [resources.apt] - packages = "erlang-dev erlang-parsetools postgresql npm" + packages = "erlang-dev erlang-parsetools npm" ##### (this part is optional and corresponds to the legacy ynh_install_extra_app_dependencies helper) From b3fefefbe722da6be04ae9fc4aa4007281ff4891 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 17:28:32 +0200 Subject: [PATCH 131/218] cleaning --- manifest.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 021b84e..9a51938 100644 --- a/manifest.toml +++ b/manifest.toml @@ -107,7 +107,7 @@ ram.runtime = "500M" type = "postgresql" [resources.apt] - packages = "erlang-dev erlang-parsetools npm" + packages = "erlang-dev erlang-parsetools postgresql npm" ##### (this part is optional and corresponds to the legacy ynh_install_extra_app_dependencies helper) @@ -139,5 +139,3 @@ ram.runtime = "500M" extras.just.key = "https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub" extras.just.packages = ["just"] - [resources.database] - type = "postgresql" From e776da7337e9248afecae02631af7702de20a040 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 17:29:17 +0200 Subject: [PATCH 132/218] install DB after the package --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 9a51938..5030607 100644 --- a/manifest.toml +++ b/manifest.toml @@ -102,9 +102,6 @@ ram.runtime = "500M" [resources.permissions] main.url = "/" - [resources.database] - # This will automatically provision/deprovison a MySQL DB and store the corresponding credentials in settings $db_user, $db_name, $db_pwd - type = "postgresql" [resources.apt] packages = "erlang-dev erlang-parsetools postgresql npm" @@ -139,3 +136,6 @@ ram.runtime = "500M" extras.just.key = "https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub" extras.just.packages = ["just"] + + [resources.database] + type = "postgresql" From 8d0e87654ca8318a627a895c55161f662b8c8162 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 17:48:32 +0200 Subject: [PATCH 133/218] cleaning + checksum for .env --- scripts/install | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/scripts/install b/scripts/install index 9f6c334..4364f1b 100644 --- a/scripts/install +++ b/scripts/install @@ -12,10 +12,6 @@ source /usr/share/yunohost/helpers ynh_install_nodejs --nodejs_version=16.13.0 # TODO : need to decide of a better version ynh_use_nodejs -secret_key_base=$(ynh_string_random --length=24) -signing_salt=$(ynh_string_random --length=24) -encryption_salt=$(ynh_string_random --length=24) - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -50,12 +46,13 @@ MEDIA_UPLOAD_SIZE="${media_upload_size//[!0-9]/}000000" ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_string="UPLOAD_LIMIT=$MEDIA_UPLOAD_SIZE" --target_file="$install_dir/.env" # Secret keys -SECRET_KEY_BASE=$(ynh_string_random) -SIGNING_SALT=$(ynh_string_random) -ENCRYPTION_SALT=$(ynh_string_random) -ynh_replace_string --match_string="__SECRET_KEY_BASE__" --replace_string="$SECRET_KEY_BASE" --target_file="$install_dir/.env" -ynh_replace_string --match_string="__SIGNING_SALT__" --replace_string="$SIGNING_SALT" --target_file="$install_dir/.env" -ynh_replace_string --match_string="__ENCRYPTION_SALT__" --replace_string="$ENCRYPTION_SALT" --target_file="$install_dir/.env" +secret_key_base=$(ynh_string_random --length=24) +signing_salt=$(ynh_string_random --length=24) +encryption_salt=$(ynh_string_random --length=24) +ynh_replace_string --match_string="__SECRET_KEY_BASE__" --replace_string="$secret_key_base" --target_file="$install_dir/.env" +ynh_replace_string --match_string="__SIGNING_SALT__" --replace_string="$signing_salt" --target_file="$install_dir/.env" +ynh_replace_string --match_string="__ENCRYPTION_SALT__" --replace_string="$encryption_salt" --target_file="$install_dir/.env" +ynh_store_file_checksum --file="$install_dir/.env" #================================================= # SPECIFIC SETUP From 924b84224cd480bf65234fd91364c800b89ce452 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 19:15:19 +0200 Subject: [PATCH 134/218] debug --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index 4364f1b..1d171ef 100644 --- a/scripts/install +++ b/scripts/install @@ -49,6 +49,7 @@ ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_str secret_key_base=$(ynh_string_random --length=24) signing_salt=$(ynh_string_random --length=24) encryption_salt=$(ynh_string_random --length=24) +ynh_warn "echo $encryption_salt" ynh_replace_string --match_string="__SECRET_KEY_BASE__" --replace_string="$secret_key_base" --target_file="$install_dir/.env" ynh_replace_string --match_string="__SIGNING_SALT__" --replace_string="$signing_salt" --target_file="$install_dir/.env" ynh_replace_string --match_string="__ENCRYPTION_SALT__" --replace_string="$encryption_salt" --target_file="$install_dir/.env" From ba24a45c00270d44767c362cdeac1a3e8b583f04 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 19:20:58 +0200 Subject: [PATCH 135/218] add erlang-os-mon --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 5030607..4758d5e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -104,7 +104,7 @@ ram.runtime = "500M" [resources.apt] - packages = "erlang-dev erlang-parsetools postgresql npm" + packages = "erlang-dev erlang-parsetools erlang-os-mon postgresql npm" ##### (this part is optional and corresponds to the legacy ynh_install_extra_app_dependencies helper) From a2f56e7fbacb1075eb1d0af30e88c123aa59b142 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 19:35:58 +0200 Subject: [PATCH 136/218] debug --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 1d171ef..f4aefab 100644 --- a/scripts/install +++ b/scripts/install @@ -49,7 +49,7 @@ ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_str secret_key_base=$(ynh_string_random --length=24) signing_salt=$(ynh_string_random --length=24) encryption_salt=$(ynh_string_random --length=24) -ynh_warn "echo $encryption_salt" +ynh_print_warn "hello world $encryption_salt" ynh_replace_string --match_string="__SECRET_KEY_BASE__" --replace_string="$secret_key_base" --target_file="$install_dir/.env" ynh_replace_string --match_string="__SIGNING_SALT__" --replace_string="$signing_salt" --target_file="$install_dir/.env" ynh_replace_string --match_string="__ENCRYPTION_SALT__" --replace_string="$encryption_salt" --target_file="$install_dir/.env" From 418e286b094f88365a04c33547f30245756f654a Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 19:39:37 +0200 Subject: [PATCH 137/218] debug 2 --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index f4aefab..fde076a 100644 --- a/scripts/install +++ b/scripts/install @@ -46,10 +46,10 @@ MEDIA_UPLOAD_SIZE="${media_upload_size//[!0-9]/}000000" ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_string="UPLOAD_LIMIT=$MEDIA_UPLOAD_SIZE" --target_file="$install_dir/.env" # Secret keys +encryption_salt=$(ynh_string_random --length=24) secret_key_base=$(ynh_string_random --length=24) signing_salt=$(ynh_string_random --length=24) -encryption_salt=$(ynh_string_random --length=24) -ynh_print_warn "hello world $encryption_salt" +ynh_print_warn --message="hello world $encryption_salt" ynh_replace_string --match_string="__SECRET_KEY_BASE__" --replace_string="$secret_key_base" --target_file="$install_dir/.env" ynh_replace_string --match_string="__SIGNING_SALT__" --replace_string="$signing_salt" --target_file="$install_dir/.env" ynh_replace_string --match_string="__ENCRYPTION_SALT__" --replace_string="$encryption_salt" --target_file="$install_dir/.env" From fbb5c6ca405d75265b95197199e67647b69a7cc0 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 19:47:14 +0200 Subject: [PATCH 138/218] debug 3 --- scripts/install | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index fde076a..1fa0933 100644 --- a/scripts/install +++ b/scripts/install @@ -46,13 +46,14 @@ MEDIA_UPLOAD_SIZE="${media_upload_size//[!0-9]/}000000" ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_string="UPLOAD_LIMIT=$MEDIA_UPLOAD_SIZE" --target_file="$install_dir/.env" # Secret keys -encryption_salt=$(ynh_string_random --length=24) +ynh_print_warn --message="hello world $some_encryption_salt" secret_key_base=$(ynh_string_random --length=24) signing_salt=$(ynh_string_random --length=24) +some_encryption_salt=$(ynh_string_random --length=24) ynh_print_warn --message="hello world $encryption_salt" ynh_replace_string --match_string="__SECRET_KEY_BASE__" --replace_string="$secret_key_base" --target_file="$install_dir/.env" ynh_replace_string --match_string="__SIGNING_SALT__" --replace_string="$signing_salt" --target_file="$install_dir/.env" -ynh_replace_string --match_string="__ENCRYPTION_SALT__" --replace_string="$encryption_salt" --target_file="$install_dir/.env" +ynh_replace_string --match_string="__ENCRYPTION_SALT__" --replace_string="$some_encryption_salt" --target_file="$install_dir/.env" ynh_store_file_checksum --file="$install_dir/.env" #================================================= From 6296633927b31c7cef495012a7891d7b97dc6a4a Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 19:49:08 +0200 Subject: [PATCH 139/218] removing doubles + reordering --- scripts/install | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/scripts/install b/scripts/install index 1fa0933..b9cf9ce 100644 --- a/scripts/install +++ b/scripts/install @@ -34,28 +34,21 @@ ynh_add_nginx_config #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 - -ynh_add_config --template="../conf/.env" --destination="$install_dir/.env" - -chmod 400 "$install_dir/.env" -chown $app:$app "$install_dir/.env" +secret_key_base=$(ynh_string_random --length=24) +signing_salt=$(ynh_string_random --length=24) +_encryption_salt=$(ynh_string_random --length=24) # max file upload size MEDIA_UPLOAD_SIZE="${media_upload_size//[!0-9]/}000000" -ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_string="UPLOAD_LIMIT=$MEDIA_UPLOAD_SIZE" --target_file="$install_dir/.env" -# Secret keys -ynh_print_warn --message="hello world $some_encryption_salt" -secret_key_base=$(ynh_string_random --length=24) -signing_salt=$(ynh_string_random --length=24) -some_encryption_salt=$(ynh_string_random --length=24) -ynh_print_warn --message="hello world $encryption_salt" -ynh_replace_string --match_string="__SECRET_KEY_BASE__" --replace_string="$secret_key_base" --target_file="$install_dir/.env" -ynh_replace_string --match_string="__SIGNING_SALT__" --replace_string="$signing_salt" --target_file="$install_dir/.env" -ynh_replace_string --match_string="__ENCRYPTION_SALT__" --replace_string="$some_encryption_salt" --target_file="$install_dir/.env" +ynh_script_progression --message="Adding a configuration file..." --weight=1 + +ynh_add_config --template="../conf/.env" --destination="$install_dir/.env" ynh_store_file_checksum --file="$install_dir/.env" +chmod 400 "$install_dir/.env" +chown $app:$app "$install_dir/.env" + #================================================= # SPECIFIC SETUP #================================================= From 092b2799a17c0c2629f3d04755787a718f436675 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 19:51:47 +0200 Subject: [PATCH 140/218] typo --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index b9cf9ce..2135de3 100644 --- a/scripts/install +++ b/scripts/install @@ -36,7 +36,7 @@ ynh_add_nginx_config #================================================= secret_key_base=$(ynh_string_random --length=24) signing_salt=$(ynh_string_random --length=24) -_encryption_salt=$(ynh_string_random --length=24) +encryption_salt=$(ynh_string_random --length=24) # max file upload size MEDIA_UPLOAD_SIZE="${media_upload_size//[!0-9]/}000000" From 996d64ab576b0f11c7b2389d08533cba92b7c957 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 13 Aug 2023 20:23:22 +0200 Subject: [PATCH 141/218] erlang-tools --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 4758d5e..e8f0315 100644 --- a/manifest.toml +++ b/manifest.toml @@ -104,7 +104,7 @@ ram.runtime = "500M" [resources.apt] - packages = "erlang-dev erlang-parsetools erlang-os-mon postgresql npm" + packages = "erlang-dev erlang-parsetools erlang-os-mon erlang-tools postgresql npm" ##### (this part is optional and corresponds to the legacy ynh_install_extra_app_dependencies helper) From 3a5d5a08f555eded786bb17993ea98cc2a865358 Mon Sep 17 00:00:00 2001 From: lapineige Date: Mon, 14 Aug 2023 00:54:49 +0200 Subject: [PATCH 142/218] erlang-xmerl --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index e8f0315..cc7bc07 100644 --- a/manifest.toml +++ b/manifest.toml @@ -104,7 +104,7 @@ ram.runtime = "500M" [resources.apt] - packages = "erlang-dev erlang-parsetools erlang-os-mon erlang-tools postgresql npm" + packages = "erlang-dev erlang-parsetools erlang-os-mon erlang-tools erlang-xmerl postgresql npm" ##### (this part is optional and corresponds to the legacy ynh_install_extra_app_dependencies helper) From 59f390628df14fc843043690b1a3adcc6ff7f9bb Mon Sep 17 00:00:00 2001 From: lapineige Date: Mon, 14 Aug 2023 15:00:22 +0200 Subject: [PATCH 143/218] Update .env --- conf/.env | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/.env b/conf/.env index fa36513..d2a06dd 100644 --- a/conf/.env +++ b/conf/.env @@ -29,7 +29,7 @@ LANGUAGE=en_US.UTF-8 REPLACE_OS_VARS=true LIVEVIEW_ENABLED=true POSTGRES_USER=postgres -POSTGRES_DB=bonfire_db +POSTGRES_DB=__APP__ ACME_AGREE=true SHOW_DEBUG_IN_DEV=true # PLUG_SERVER=bandit @@ -43,10 +43,10 @@ SIGNING_SALT=__SIGNING_SALT__ ENCRYPTION_SALT=__ENCRYPTION_SALT__ # database access -POSTGRES_PASSWORD=put_a_secure_db_pw_here +POSTGRES_PASSWORD=__DB_PWD__ # password for the search index -MEILI_MASTER_KEY=put-a-key-to-protect-the-search-index-here +MEILI_MASTER_KEY=__MEILI_MASTER_KEY__ ## TODO # email deliverym if you use mailgun.com, edit with your domain and API key From 7b4a5e90b3b12b2ec0e286dfe5cbd377ab21dbc9 Mon Sep 17 00:00:00 2001 From: lapineige Date: Mon, 14 Aug 2023 15:01:32 +0200 Subject: [PATCH 144/218] meili key + documentation --- scripts/install | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 2135de3..d1f36dc 100644 --- a/scripts/install +++ b/scripts/install @@ -34,10 +34,12 @@ ynh_add_nginx_config #================================================= # ADD A CONFIGURATION #================================================= +## Generate secrets and other config values secret_key_base=$(ynh_string_random --length=24) signing_salt=$(ynh_string_random --length=24) encryption_salt=$(ynh_string_random --length=24) - +# search +meili_master_key=$(ynh_string_random --length=24) # max file upload size MEDIA_UPLOAD_SIZE="${media_upload_size//[!0-9]/}000000" From e7ffb39b8606cb2cb215dec9230b85105608788a Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 15 Aug 2023 00:02:40 +0200 Subject: [PATCH 145/218] node-postcss --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index cc7bc07..247c86a 100644 --- a/manifest.toml +++ b/manifest.toml @@ -104,7 +104,7 @@ ram.runtime = "500M" [resources.apt] - packages = "erlang-dev erlang-parsetools erlang-os-mon erlang-tools erlang-xmerl postgresql npm" + packages = "erlang-dev erlang-parsetools erlang-os-mon erlang-tools erlang-xmerl postgresql npm node-postcss" ##### (this part is optional and corresponds to the legacy ynh_install_extra_app_dependencies helper) From 68ea51a8e51adf9debf17d4b935037bbb0b3c81f Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 15 Aug 2023 10:25:59 +0200 Subject: [PATCH 146/218] fix postgres user --- conf/.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/.env b/conf/.env index d2a06dd..cf052a1 100644 --- a/conf/.env +++ b/conf/.env @@ -28,7 +28,7 @@ LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 REPLACE_OS_VARS=true LIVEVIEW_ENABLED=true -POSTGRES_USER=postgres +POSTGRES_USER=__APP__ POSTGRES_DB=__APP__ ACME_AGREE=true SHOW_DEBUG_IN_DEV=true From 6fac6a0276e118b617870ea64db8632b55714ca8 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 15 Aug 2023 11:42:50 +0200 Subject: [PATCH 147/218] don't run the migration https://github.com/YunoHost-Apps/bonfire_ynh/pull/2#issuecomment-1678664426 --- scripts/install | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index d1f36dc..daf33de 100644 --- a/scripts/install +++ b/scripts/install @@ -80,9 +80,10 @@ ynh_exec_warn ynh_exec_as $app $ynh_node_load_PATH -s $SHELL -lc "WITH_DOCKER=no #================================================= release_folder="_build/prod/rel/bonfire" -ynh_script_progression --message="Running database migrations..." --weight=1 -# Database created before, let's run the migrations -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just cmd $release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()'" +### Not running the migration, they are done on startup anyway +#ynh_script_progression --message="Running database migrations..." --weight=1 +## Database created before, let's run the migrations +#ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just cmd $release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()'" ynh_script_progression --message="Starting Bonfire..." --weight=1 ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just cmd $release_folder/bin/bonfire start" From 365c7fec0b7bd7debf5db87716865e2c261c3086 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 15 Aug 2023 11:58:19 +0200 Subject: [PATCH 148/218] =?UTF-8?q?Here=20we=20go=20for=20a=20proper=20dae?= =?UTF-8?q?mon=20service=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/remove | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/remove b/scripts/remove index 1ceb10e..271d9ff 100644 --- a/scripts/remove +++ b/scripts/remove @@ -17,14 +17,28 @@ ynh_script_progression --message="Stop Bonfire..." --weight=1 # start bonfire as a daemon "$release_folder/bin/bonfire stop" + + #================================================= -# REMOVE NGINX CONFIGURATION +# REMOVE SYSTEM CONFIGURATIONS SERVICE #================================================= +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 + +# Remove the service from the list of services known by YunoHost (added from `yunohost service add`) +if ynh_exec_warn_less yunohost service status $app >/dev/null +then + ynh_script_progression --message="Removing $app service integration..." --weight=1 + yunohost service remove $app +fi + +ynh_remove_systemd_config ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 # Remove the dedicated NGINX config ynh_remove_nginx_config +ynh_remove_logrotate + #================================================= # END OF SCRIPT #================================================= From e6317737112f91dd1aed24c88e46218149a1657c Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 15 Aug 2023 11:58:43 +0200 Subject: [PATCH 149/218] typos --- scripts/remove | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/remove b/scripts/remove index 271d9ff..7fb73ea 100644 --- a/scripts/remove +++ b/scripts/remove @@ -12,9 +12,9 @@ source /usr/share/yunohost/helpers #================================================= # REMOVE DEDICATED USER #================================================= -ynh_script_progression --message="Stop Bonfire..." --weight=1 +ynh_script_progression --message="Stoping Bonfire..." --weight=1 -# start bonfire as a daemon +# stop bonfire daemon "$release_folder/bin/bonfire stop" From a28db3c21278a56d1e1dcd400d587315db3f4533 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 15 Aug 2023 12:00:01 +0200 Subject: [PATCH 150/218] remove log file --- scripts/remove | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/remove b/scripts/remove index 7fb73ea..35decdd 100644 --- a/scripts/remove +++ b/scripts/remove @@ -38,6 +38,7 @@ ynh_script_progression --message="Removing NGINX web server configuration..." -- ynh_remove_nginx_config ynh_remove_logrotate +ynh_secure_remove --file="/var/log/$app" #================================================= # END OF SCRIPT From 08352c1cbb79df02ea761c5602b72b8e0ba38851 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 15 Aug 2023 12:03:17 +0200 Subject: [PATCH 151/218] =?UTF-8?q?Here=20we=20go=20for=20a=20proper=20dae?= =?UTF-8?q?mon=20service=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/systemd.service | 50 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 conf/systemd.service diff --git a/conf/systemd.service b/conf/systemd.service new file mode 100644 index 0000000..abbbc3e --- /dev/null +++ b/conf/systemd.service @@ -0,0 +1,50 @@ +[Unit] +Description=Bonfire daemon +After=network.target + +[Service] +Type=simple +User=__APP__ +Group=__APP__ +WorkingDirectory=__INSTALL_DIR__/ +ExecStart=_WITH_DOCKER=no _INSTALL_DIR__/just cmd _build/prod/rel/bonfire/bin/bonfire start daemon +StandardOutput=append:/var/log/__APP__/__APP__.log +StandardError=inherit + +# Sandboxing options to harden security +# Depending on specificities of your service/app, you may need to tweak these +# .. but this should be a good baseline +# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html +NoNewPrivileges=yes +PrivateTmp=yes +PrivateDevices=yes +RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK +RestrictNamespaces=yes +RestrictRealtime=yes +DevicePolicy=closed +ProtectClock=yes +ProtectHostname=yes +ProtectProc=invisible +ProtectSystem=full +ProtectControlGroups=yes +ProtectKernelModules=yes +ProtectKernelTunables=yes +LockPersonality=yes +SystemCallArchitectures=native +SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap @cpu-emulation @privileged + +# Denying access to capabilities that should not be relevant for webapps +# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html +CapabilityBoundingSet=~CAP_RAWIO CAP_MKNOD +CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE +CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT +CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK +CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM +CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG +CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE +CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW +CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG + +[Install] +WantedBy=multi-user.target + From 9e80a1787088fa6e7cdb1ca5a6542510c3eb0192 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 15 Aug 2023 12:03:28 +0200 Subject: [PATCH 152/218] =?UTF-8?q?Here=20we=20go=20for=20a=20proper=20dae?= =?UTF-8?q?mon=20service=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/install | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index daf33de..18f5760 100644 --- a/scripts/install +++ b/scripts/install @@ -76,7 +76,7 @@ ynh_exec_warn ynh_exec_as $app $ynh_node_load_PATH -s $SHELL -lc "WITH_DOCKER=no #ynh_exec_warn just rel-build # node needs (root) access to /usr/local/lib/node_modules #================================================= -# Run the release +# START SYSTEMD SERVICE - Run the release #================================================= release_folder="_build/prod/rel/bonfire" @@ -85,12 +85,19 @@ release_folder="_build/prod/rel/bonfire" ## Database created before, let's run the migrations #ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just cmd $release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()'" -ynh_script_progression --message="Starting Bonfire..." --weight=1 -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just cmd $release_folder/bin/bonfire start" +#ynh_script_progression --message="Starting Bonfire..." --weight=1 +#ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just cmd $release_folder/bin/bonfire start" -# start bonfire as a daemon -ynh_script_progression --message="Starting Bonfire daemon..." --weight=1 -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just cmd $release_folder/bin/bonfire start daemon" +# Create a dedicated systemd config +ynh_add_systemd_config + +yunohost service add $app --description="Bonfire daemon" --log="/var/log/$app/$app.log" + + +ynh_script_progression --message="Starting Bonfire daemon service..." --weight=1 + +# Start a systemd service +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" #================================================= # END OF SCRIPT From 7152c51e97714ef2d1a1900ca23ef319a6461548 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 15 Aug 2023 12:23:49 +0200 Subject: [PATCH 153/218] remove debug --- scripts/install | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/install b/scripts/install index 18f5760..9ca8cd6 100644 --- a/scripts/install +++ b/scripts/install @@ -60,9 +60,9 @@ export WITH_DOCKER=no # or source .env ? # Using this for now ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no mix local.hex --force" # install Hex in non-interractive way -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just config-basic" -#ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just mix bonfire.deps .update" +ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no mix local.hex --force" # install Hex in non-interractive way +ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just config-basic" +#ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just mix bonfire.deps .update" #================================================= # Building the release @@ -72,8 +72,8 @@ export TERM=linux # why is that not defined ? export TERMINFO=/etc/terminfo ### DONT USE GLOBAL NPM INSTALL ynh_replace_string --match_string="npm install --global" --replace_string="npm install" --target_file="$install_dir/justfile" -ynh_exec_warn ynh_exec_as $app $ynh_node_load_PATH -s $SHELL -lc "WITH_DOCKER=no just rel-build" -#ynh_exec_warn just rel-build # node needs (root) access to /usr/local/lib/node_modules +ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH -s $SHELL -lc "WITH_DOCKER=no just rel-build" +#ynh_exec_warn_less just rel-build # node needs (root) access to /usr/local/lib/node_modules #================================================= # START SYSTEMD SERVICE - Run the release @@ -83,10 +83,10 @@ release_folder="_build/prod/rel/bonfire" ### Not running the migration, they are done on startup anyway #ynh_script_progression --message="Running database migrations..." --weight=1 ## Database created before, let's run the migrations -#ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just cmd $release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()'" +#ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just cmd $release_folder/bin/bonfire eval 'EctoSparkles.Migrator.migrate()'" #ynh_script_progression --message="Starting Bonfire..." --weight=1 -#ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just cmd $release_folder/bin/bonfire start" +#ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just cmd $release_folder/bin/bonfire start" # Create a dedicated systemd config ynh_add_systemd_config From 18adf816f9af27fb7db3f5741d8dfc5bec6c6c25 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 15 Aug 2023 12:35:23 +0200 Subject: [PATCH 154/218] typo --- conf/systemd.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/systemd.service b/conf/systemd.service index abbbc3e..4a87df9 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ -ExecStart=_WITH_DOCKER=no _INSTALL_DIR__/just cmd _build/prod/rel/bonfire/bin/bonfire start daemon +ExecStart=WITH_DOCKER=no _INSTALL_DIR__/just cmd _build/prod/rel/bonfire/bin/bonfire start daemon StandardOutput=append:/var/log/__APP__/__APP__.log StandardError=inherit From 56155c40c297271858d69d460c9fd2c544d5fadc Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 15 Aug 2023 12:35:58 +0200 Subject: [PATCH 155/218] typo --- conf/systemd.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/systemd.service b/conf/systemd.service index 4a87df9..666c4e8 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ -ExecStart=WITH_DOCKER=no _INSTALL_DIR__/just cmd _build/prod/rel/bonfire/bin/bonfire start daemon +ExecStart=WITH_DOCKER=no __INSTALL_DIR__/just cmd _build/prod/rel/bonfire/bin/bonfire start daemon StandardOutput=append:/var/log/__APP__/__APP__.log StandardError=inherit From c9cd6d07d5cf0e07b3ac16b06fb73b8b9aa15fad Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 15 Aug 2023 12:37:11 +0200 Subject: [PATCH 156/218] wrong command path --- conf/systemd.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/systemd.service b/conf/systemd.service index 666c4e8..5633bbe 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ -ExecStart=WITH_DOCKER=no __INSTALL_DIR__/just cmd _build/prod/rel/bonfire/bin/bonfire start daemon +ExecStart=WITH_DOCKER=no just cmd __INSTALL_DIR__/_build/prod/rel/bonfire/bin/bonfire start daemon StandardOutput=append:/var/log/__APP__/__APP__.log StandardError=inherit From a3d9717d1843f8517a719fce341314612e407485 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 17 Jan 2024 14:04:43 +0000 Subject: [PATCH 157/218] bump version to 0.9.6 beta 23 https://github.com/bonfire-networks/bonfire-app/releases/tag/v0.9.6-beta.23 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 247c86a..046ea50 100644 --- a/manifest.toml +++ b/manifest.toml @@ -3,7 +3,7 @@ packaging_format = 2 id = "bonfire" name = "Bonfire" -version = "0.9.6~ynh3" +version = "0.9.6~ynh4" maintainers = ["Lapineige"] @@ -89,8 +89,8 @@ ram.runtime = "500M" [resources.sources] [resources.sources.main] - url = "https://github.com/bonfire-networks/bonfire-app/archive/d898a7659bfaf47298998dc4f43b378508eee00e.tar.gz" - sha256 = "0fb2058365f035591833287f91faf43de5aac553db53be314143437f756ae224" + url = "https://github.com/bonfire-networks/bonfire-app/archive/refs/tags/v0.9.6-beta.23.tar.gz" + sha256 = "8a7ae1db683bf0f286d7cc0b7ac9ac8c9cb2c6963ae6e34d44836b0945c1872a" [resources.ports] From 1b613fc514818ce02f993d2dd3e9e9caf4410bb5 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 17 Jan 2024 14:04:46 +0000 Subject: [PATCH 158/218] Auto-update README --- README.md | 4 ++-- README_fr.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3e15def..58c7a5d 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Federated social networking server built on ActivityPub open protocol -**Shipped version:** 0.9.6~ynh3 +**Shipped version:** 0.9.6~ynh4 **Demo:** https://playground.bonfire.cafe/ ## Documentation and resources @@ -27,7 +27,7 @@ Federated social networking server built on ActivityPub open protocol * Official user documentation: * Official admin documentation: * Upstream app code repository: -* YunoHost documentation for this app: +* YunoHost Store: * Report a bug: ## Developer info diff --git a/README_fr.md b/README_fr.md index 877802d..137c766 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Serveur de réseautage social fédéré basé sur le protocole ouvert ActivityPub -**Version incluse :** 0.9.6~ynh3 +**Version incluse :** 0.9.6~ynh4 **Démo :** https://playground.bonfire.cafe/ ## Documentations et ressources @@ -27,7 +27,7 @@ Serveur de réseautage social fédéré basé sur le protocole ouvert ActivityPu * Documentation officielle utilisateur : * Documentation officielle de l’admin : * Dépôt de code officiel de l’app : -* Documentation YunoHost pour cette app : +* YunoHost Store: * Signaler un bug : ## Informations pour les développeurs From 411ed4933b8710b5265f37baeaca50204ac04b7a Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 17 Jan 2024 14:15:27 +0000 Subject: [PATCH 159/218] go back elixir15 / erlang 26 --- manifest.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/manifest.toml b/manifest.toml index 046ea50..617ab7b 100644 --- a/manifest.toml +++ b/manifest.toml @@ -115,17 +115,17 @@ ram.runtime = "500M" ### Elixir 13 dependency - instead of v15 for now - extras.elixir13.repo = "deb https://packages.erlang-solutions.com/debian bullseye contrib" - extras.elixir13.key = "https://packages.erlang-solutions.com/debian/erlang_solutions.asc" - extras.elixir13.packages = ["elixir"] + #extras.elixir13.repo = "deb https://packages.erlang-solutions.com/debian bullseye contrib" + #extras.elixir13.key = "https://packages.erlang-solutions.com/debian/erlang_solutions.asc" + #extras.elixir13.packages = ["elixir"] ### Elixir 15 dependency # Bulleyes comes with v1.10 instead of v1.15 that is required # ynh_install_extra_app_dependencies --repo="https://packages.erlang-solutions.com/debian bullseye contrib" --package="elixir-lang" --key='https://packages.erlang-solutions.com/debian/erlang_solutions.asc' # v15 is not available in default repo. RabbitMQ repo should be used (https://elixir-lang.org/install.html). No debian simple syntax. TODO later, using the simple syntax for now # erlang 26, for elixir v1.15 - #extras.elixir15.repo = "deb https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu jammy main" - #extras.elixir15.key = "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xb279943d2a549531e144b875f77f1eda57ebb1cc" - #extras.elixir15.packages = ["elixir-lang"] + extras.elixir15.repo = "deb https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu jammy main" + extras.elixir15.key = "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xb279943d2a549531e144b875f77f1eda57ebb1cc" + extras.elixir15.packages = ["elixir-lang"] # exlang-dev -> https://github.com/elixir-lang/ex_doc/pull/1442/files # Debian default package is newer (enough), don't use this custom repo ### just dependency From a1632cf403a140741f6d9a4c60bbfad037e487a4 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 17 Jan 2024 14:21:39 +0000 Subject: [PATCH 160/218] fix package name --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 617ab7b..6914bcc 100644 --- a/manifest.toml +++ b/manifest.toml @@ -125,7 +125,7 @@ ram.runtime = "500M" # erlang 26, for elixir v1.15 extras.elixir15.repo = "deb https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu jammy main" extras.elixir15.key = "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xb279943d2a549531e144b875f77f1eda57ebb1cc" - extras.elixir15.packages = ["elixir-lang"] + extras.elixir15.packages = ["elixir"] # exlang-dev -> https://github.com/elixir-lang/ex_doc/pull/1442/files # Debian default package is newer (enough), don't use this custom repo ### just dependency From ba3ab0988509aaa4979e291dcf1e1845fc9bbb2a Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 17 Jan 2024 14:39:49 +0000 Subject: [PATCH 161/218] Let's try with mise... `rtx install` from https://github.com/bonfire-networks/bonfire-app/blob/v0.9.6-beta.23/docs/DEPLOY.md#dependencies is now mise https://mise.jdx.dev/rtx.html https://mise.jdx.dev/getting-started.html#apt --- manifest.toml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 6914bcc..b070694 100644 --- a/manifest.toml +++ b/manifest.toml @@ -123,10 +123,14 @@ ram.runtime = "500M" # ynh_install_extra_app_dependencies --repo="https://packages.erlang-solutions.com/debian bullseye contrib" --package="elixir-lang" --key='https://packages.erlang-solutions.com/debian/erlang_solutions.asc' # v15 is not available in default repo. RabbitMQ repo should be used (https://elixir-lang.org/install.html). No debian simple syntax. TODO later, using the simple syntax for now # erlang 26, for elixir v1.15 - extras.elixir15.repo = "deb https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu jammy main" - extras.elixir15.key = "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xb279943d2a549531e144b875f77f1eda57ebb1cc" - extras.elixir15.packages = ["elixir"] + #extras.elixir15.repo = "deb https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu jammy main" + #extras.elixir15.key = "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xb279943d2a549531e144b875f77f1eda57ebb1cc" + #extras.elixir15.packages = ["elixir"] # exlang-dev -> https://github.com/elixir-lang/ex_doc/pull/1442/files # Debian default package is newer (enough), don't use this custom repo + ### Elixir 15 with mise + extras.mise.repo = "deb arch=amd64 https://mise.jdx.dev/deb stable main" + extras.mise.key = "https://mise.jdx.dev/gpg-key.pub" + extras.mise.packages = ["mise"] ### just dependency # TODO : this is unsafe and should be dealt with in a better way. From cad850c31d0b9f72ea51e1e35c650ae6022c0731 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 17 Jan 2024 14:41:50 +0000 Subject: [PATCH 162/218] Let's try with mise... --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index 9ca8cd6..24f37dc 100644 --- a/scripts/install +++ b/scripts/install @@ -60,6 +60,7 @@ export WITH_DOCKER=no # or source .env ? # Using this for now ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir +ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "mise install" # install Elixir ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no mix local.hex --force" # install Hex in non-interractive way ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just config-basic" #ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just mix bonfire.deps .update" From 99ff835d76349d4d7a417733768ec9e64eb58a14 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 17 Jan 2024 14:48:54 +0000 Subject: [PATCH 163/218] remove arch --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index b070694..9956009 100644 --- a/manifest.toml +++ b/manifest.toml @@ -128,7 +128,7 @@ ram.runtime = "500M" #extras.elixir15.packages = ["elixir"] # exlang-dev -> https://github.com/elixir-lang/ex_doc/pull/1442/files # Debian default package is newer (enough), don't use this custom repo ### Elixir 15 with mise - extras.mise.repo = "deb arch=amd64 https://mise.jdx.dev/deb stable main" + extras.mise.repo = "deb https://mise.jdx.dev/deb stable main" extras.mise.key = "https://mise.jdx.dev/gpg-key.pub" extras.mise.packages = ["mise"] From 908dd472e6476607e9ee127188ba0f590300539d Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 17 Jan 2024 15:05:00 +0000 Subject: [PATCH 164/218] verbose error --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 24f37dc..c36a3f1 100644 --- a/scripts/install +++ b/scripts/install @@ -60,7 +60,7 @@ export WITH_DOCKER=no # or source .env ? # Using this for now ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir -ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "mise install" # install Elixir +ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "mise --verbose install" # install Elixir ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no mix local.hex --force" # install Hex in non-interractive way ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just config-basic" #ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just mix bonfire.deps .update" From d781f05f6bfb4e9bd51981209f606439962adba8 Mon Sep 17 00:00:00 2001 From: lapineige Date: Fri, 19 Jan 2024 11:20:21 +0100 Subject: [PATCH 165/218] add node-postcss-cli https://github.com/YunoHost-Apps/bonfire_ynh/pull/2#issuecomment-1900091380 --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 9956009..897b847 100644 --- a/manifest.toml +++ b/manifest.toml @@ -104,7 +104,7 @@ ram.runtime = "500M" [resources.apt] - packages = "erlang-dev erlang-parsetools erlang-os-mon erlang-tools erlang-xmerl postgresql npm node-postcss" + packages = "erlang-dev erlang-parsetools erlang-os-mon erlang-tools erlang-xmerl postgresql npm node-postcss node-postcss-cli" ##### (this part is optional and corresponds to the legacy ynh_install_extra_app_dependencies helper) From 0356d84a606bcc07307032284d6ba9de39559310 Mon Sep 17 00:00:00 2001 From: lapineige Date: Fri, 19 Jan 2024 18:53:43 +0100 Subject: [PATCH 166/218] remove node-postcss-cli --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 897b847..9956009 100644 --- a/manifest.toml +++ b/manifest.toml @@ -104,7 +104,7 @@ ram.runtime = "500M" [resources.apt] - packages = "erlang-dev erlang-parsetools erlang-os-mon erlang-tools erlang-xmerl postgresql npm node-postcss node-postcss-cli" + packages = "erlang-dev erlang-parsetools erlang-os-mon erlang-tools erlang-xmerl postgresql npm node-postcss" ##### (this part is optional and corresponds to the legacy ynh_install_extra_app_dependencies helper) From 863291712b7969bbd579d1cd24caa3ded52046de Mon Sep 17 00:00:00 2001 From: lapineige Date: Fri, 19 Jan 2024 18:54:34 +0100 Subject: [PATCH 167/218] back to normal Elixir 13 --- manifest.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/manifest.toml b/manifest.toml index 9956009..8892f5d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -115,9 +115,9 @@ ram.runtime = "500M" ### Elixir 13 dependency - instead of v15 for now - #extras.elixir13.repo = "deb https://packages.erlang-solutions.com/debian bullseye contrib" - #extras.elixir13.key = "https://packages.erlang-solutions.com/debian/erlang_solutions.asc" - #extras.elixir13.packages = ["elixir"] + extras.elixir13.repo = "deb https://packages.erlang-solutions.com/debian bullseye contrib" + extras.elixir13.key = "https://packages.erlang-solutions.com/debian/erlang_solutions.asc" + extras.elixir13.packages = ["elixir"] ### Elixir 15 dependency # Bulleyes comes with v1.10 instead of v1.15 that is required # ynh_install_extra_app_dependencies --repo="https://packages.erlang-solutions.com/debian bullseye contrib" --package="elixir-lang" --key='https://packages.erlang-solutions.com/debian/erlang_solutions.asc' @@ -128,9 +128,9 @@ ram.runtime = "500M" #extras.elixir15.packages = ["elixir"] # exlang-dev -> https://github.com/elixir-lang/ex_doc/pull/1442/files # Debian default package is newer (enough), don't use this custom repo ### Elixir 15 with mise - extras.mise.repo = "deb https://mise.jdx.dev/deb stable main" - extras.mise.key = "https://mise.jdx.dev/gpg-key.pub" - extras.mise.packages = ["mise"] + #extras.mise.repo = "deb https://mise.jdx.dev/deb stable main" + #extras.mise.key = "https://mise.jdx.dev/gpg-key.pub" + #extras.mise.packages = ["mise"] ### just dependency # TODO : this is unsafe and should be dealt with in a better way. From bdf93331a1aa1bf7bf21a8b08ae2713a38a89227 Mon Sep 17 00:00:00 2001 From: lapineige Date: Fri, 19 Jan 2024 19:02:38 +0100 Subject: [PATCH 168/218] remove mise --- scripts/install | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/install b/scripts/install index c36a3f1..9ca8cd6 100644 --- a/scripts/install +++ b/scripts/install @@ -60,7 +60,6 @@ export WITH_DOCKER=no # or source .env ? # Using this for now ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir -ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "mise --verbose install" # install Elixir ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no mix local.hex --force" # install Hex in non-interractive way ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just config-basic" #ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just mix bonfire.deps .update" From 179aed916978e9daaea099c9d752de2aba5f9112 Mon Sep 17 00:00:00 2001 From: lapineige Date: Fri, 19 Jan 2024 23:11:17 +0100 Subject: [PATCH 169/218] update to latest commit https://github.com/YunoHost-Apps/bonfire_ynh/pull/2#issuecomment-1901181952 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 8892f5d..6e45a1f 100644 --- a/manifest.toml +++ b/manifest.toml @@ -3,7 +3,7 @@ packaging_format = 2 id = "bonfire" name = "Bonfire" -version = "0.9.6~ynh4" +version = "0.9.6~ynh5" maintainers = ["Lapineige"] @@ -89,8 +89,8 @@ ram.runtime = "500M" [resources.sources] [resources.sources.main] - url = "https://github.com/bonfire-networks/bonfire-app/archive/refs/tags/v0.9.6-beta.23.tar.gz" - sha256 = "8a7ae1db683bf0f286d7cc0b7ac9ac8c9cb2c6963ae6e34d44836b0945c1872a" + url = "https://github.com/bonfire-networks/bonfire-app/archive/6203b19aa385e4aec4cfe5b14a069d301647430b.tar.gz" + sha256 = "04a2c941ddd2935d5d86c6ca0bbd9a87166c1c07e79813af92b8741714996461" [resources.ports] From 7051d77d0f6f05d2e582c9bfed038bb562ea35c5 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 19 Jan 2024 22:11:20 +0000 Subject: [PATCH 170/218] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 58c7a5d..8fb592f 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Federated social networking server built on ActivityPub open protocol -**Shipped version:** 0.9.6~ynh4 +**Shipped version:** 0.9.6~ynh5 **Demo:** https://playground.bonfire.cafe/ ## Documentation and resources diff --git a/README_fr.md b/README_fr.md index 137c766..a5063c8 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Serveur de réseautage social fédéré basé sur le protocole ouvert ActivityPub -**Version incluse :** 0.9.6~ynh4 +**Version incluse :** 0.9.6~ynh5 **Démo :** https://playground.bonfire.cafe/ ## Documentations et ressources From 72b5322854404cbcb750436c8c99971f60c28984 Mon Sep 17 00:00:00 2001 From: lapineige Date: Fri, 19 Jan 2024 23:44:12 +0100 Subject: [PATCH 171/218] install npx --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index 9ca8cd6..3112162 100644 --- a/scripts/install +++ b/scripts/install @@ -72,6 +72,7 @@ export TERM=linux # why is that not defined ? export TERMINFO=/etc/terminfo ### DONT USE GLOBAL NPM INSTALL ynh_replace_string --match_string="npm install --global" --replace_string="npm install" --target_file="$install_dir/justfile" +ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no NODE_ENV=production $ynh_npm install npx" ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH -s $SHELL -lc "WITH_DOCKER=no just rel-build" #ynh_exec_warn_less just rel-build # node needs (root) access to /usr/local/lib/node_modules From 4abcaa9d5b693d7121cb252f90400b5fb9526a28 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 20 Jan 2024 15:34:18 +0100 Subject: [PATCH 172/218] use ynh_npm for npx + debug --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 3112162..0d619ba 100644 --- a/scripts/install +++ b/scripts/install @@ -72,7 +72,8 @@ export TERM=linux # why is that not defined ? export TERMINFO=/etc/terminfo ### DONT USE GLOBAL NPM INSTALL ynh_replace_string --match_string="npm install --global" --replace_string="npm install" --target_file="$install_dir/justfile" -ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no NODE_ENV=production $ynh_npm install npx" +ynh_replace_string --match_string="npx" --replace_string="$ynh_npm exec --" --target_file="$install_dir/justfile" +ynh_exec_warn ynh_exec_as $app $ynh_node_load_PATH -s $SHELL -lc "cat $install_dir/justfile" ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH -s $SHELL -lc "WITH_DOCKER=no just rel-build" #ynh_exec_warn_less just rel-build # node needs (root) access to /usr/local/lib/node_modules From 6813b5ac3655fe17437f1e377b1c281870ad660d Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 20 Jan 2024 15:51:44 +0100 Subject: [PATCH 173/218] comment debug --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 0d619ba..1a2405a 100644 --- a/scripts/install +++ b/scripts/install @@ -72,8 +72,8 @@ export TERM=linux # why is that not defined ? export TERMINFO=/etc/terminfo ### DONT USE GLOBAL NPM INSTALL ynh_replace_string --match_string="npm install --global" --replace_string="npm install" --target_file="$install_dir/justfile" -ynh_replace_string --match_string="npx" --replace_string="$ynh_npm exec --" --target_file="$install_dir/justfile" -ynh_exec_warn ynh_exec_as $app $ynh_node_load_PATH -s $SHELL -lc "cat $install_dir/justfile" +#ynh_replace_string --match_string="npx" --replace_string="$ynh_npm exec --" --target_file="$install_dir/justfile" +#ynh_exec_warn ynh_exec_as $app $ynh_node_load_PATH -s $SHELL -lc "cat $install_dir/justfile" ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH -s $SHELL -lc "WITH_DOCKER=no just rel-build" #ynh_exec_warn_less just rel-build # node needs (root) access to /usr/local/lib/node_modules From 10dd8fe42dd501ef3fa107e462890734c4b1a922 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 20 Jan 2024 15:52:21 +0100 Subject: [PATCH 174/218] Update manifest.toml https://github.com/YunoHost-Apps/bonfire_ynh/pull/2#issuecomment-1902116392 --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 6e45a1f..1a30463 100644 --- a/manifest.toml +++ b/manifest.toml @@ -89,8 +89,8 @@ ram.runtime = "500M" [resources.sources] [resources.sources.main] - url = "https://github.com/bonfire-networks/bonfire-app/archive/6203b19aa385e4aec4cfe5b14a069d301647430b.tar.gz" - sha256 = "04a2c941ddd2935d5d86c6ca0bbd9a87166c1c07e79813af92b8741714996461" + url = "https://github.com/bonfire-networks/bonfire-app/archive/4d322e393580afebafd1574e2d9427ef09ff7aab.tar.gz" + sha256 = "6cc322cdb01fa326c05e59edfe0da41134eee3d0df71a3bb9fb124a629e8a59f" [resources.ports] From c5844eb6fdc76d1c297fd81e8bb65cc4553bdaae Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 20 Jan 2024 16:19:31 +0100 Subject: [PATCH 175/218] use nodejs 16 --- scripts/_common.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/_common.sh b/scripts/_common.sh index 944a65e..b818f0f 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,6 +4,8 @@ # COMMON VARIABLES #================================================= +nodejs_version=16 + #================================================= # PERSONAL HELPERS #================================================= From b4468b22226d29d7232b119a574b0f8811128c03 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 20 Jan 2024 16:27:05 +0100 Subject: [PATCH 176/218] node JS 18 --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index b818f0f..9195d57 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -nodejs_version=16 +nodejs_version=18 #================================================= # PERSONAL HELPERS From 6fb266bf74b58739cdecd78cca06d2c8de7f42ef Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 20 Jan 2024 16:27:40 +0100 Subject: [PATCH 177/218] use nodejs version from _common.sh --- scripts/install | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 1a2405a..079e4de 100644 --- a/scripts/install +++ b/scripts/install @@ -9,7 +9,12 @@ source _common.sh source /usr/share/yunohost/helpers -ynh_install_nodejs --nodejs_version=16.13.0 # TODO : need to decide of a better version +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing nodejs..." + +ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version ynh_use_nodejs #================================================= From 64dc026917e43a40bce655a11c43bcad675ba9b5 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 20 Jan 2024 17:13:57 +0100 Subject: [PATCH 178/218] $ynh_node_load_PATH misplaced --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 079e4de..d3f5b3f 100644 --- a/scripts/install +++ b/scripts/install @@ -78,8 +78,8 @@ export TERMINFO=/etc/terminfo ### DONT USE GLOBAL NPM INSTALL ynh_replace_string --match_string="npm install --global" --replace_string="npm install" --target_file="$install_dir/justfile" #ynh_replace_string --match_string="npx" --replace_string="$ynh_npm exec --" --target_file="$install_dir/justfile" -#ynh_exec_warn ynh_exec_as $app $ynh_node_load_PATH -s $SHELL -lc "cat $install_dir/justfile" -ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH -s $SHELL -lc "WITH_DOCKER=no just rel-build" +#ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "$ynh_node_load_PATH cat $install_dir/justfile" +ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no $ynh_node_load_PATH just rel-build" #ynh_exec_warn_less just rel-build # node needs (root) access to /usr/local/lib/node_modules #================================================= From 7464914709126f906c0ef7c858b0d1af96587615 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 20 Jan 2024 17:55:51 +0100 Subject: [PATCH 179/218] Update manifest.toml https://github.com/YunoHost-Apps/bonfire_ynh/pull/2#issuecomment-1902169550 --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 1a30463..96995c2 100644 --- a/manifest.toml +++ b/manifest.toml @@ -89,8 +89,8 @@ ram.runtime = "500M" [resources.sources] [resources.sources.main] - url = "https://github.com/bonfire-networks/bonfire-app/archive/4d322e393580afebafd1574e2d9427ef09ff7aab.tar.gz" - sha256 = "6cc322cdb01fa326c05e59edfe0da41134eee3d0df71a3bb9fb124a629e8a59f" + url = "https://github.com/bonfire-networks/bonfire-app/archive/ccaef9764e6dd74bc260d5e308f9fad04954f18b.tar.gz" + sha256 = "c83756bc01d81d6a2db6f0b0c816e6147d79ebbfbf244da660bb40840bc28b06" [resources.ports] From d2a0231f34e6c2683321e35e3880d4a9c36ab57c Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 20 Jan 2024 18:51:23 +0100 Subject: [PATCH 180/218] Avoid Elixir 15 https://github.com/YunoHost-Apps/bonfire_ynh/pull/2#issuecomment-1902192355 --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 96995c2..8d3bb23 100644 --- a/manifest.toml +++ b/manifest.toml @@ -89,8 +89,8 @@ ram.runtime = "500M" [resources.sources] [resources.sources.main] - url = "https://github.com/bonfire-networks/bonfire-app/archive/ccaef9764e6dd74bc260d5e308f9fad04954f18b.tar.gz" - sha256 = "c83756bc01d81d6a2db6f0b0c816e6147d79ebbfbf244da660bb40840bc28b06" + url = "https://github.com/bonfire-networks/bonfire-app/archive/7a43fd2202c6c442813cce944ba867419fee786e.tar.gz" + sha256 = "617a7469a3bafe632d104e99f21ae4026b8c9bb545c662ecb8d3413bc02b3ab9" [resources.ports] From 0dc7c9e7afce6487fea776259db9279c875cfc1d Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 20 Jan 2024 23:01:50 +0100 Subject: [PATCH 181/218] debug : erlang version --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index d3f5b3f..81651a5 100644 --- a/scripts/install +++ b/scripts/install @@ -65,6 +65,7 @@ export WITH_DOCKER=no # or source .env ? # Using this for now ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "erl -s halt" ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no mix local.hex --force" # install Hex in non-interractive way ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just config-basic" #ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just mix bonfire.deps .update" From d8d4f9fbe9028be335f7e18ede68bb9ed8e42d2c Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 20 Jan 2024 23:25:44 +0100 Subject: [PATCH 182/218] remove debug --- scripts/install | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/install b/scripts/install index 81651a5..d3f5b3f 100644 --- a/scripts/install +++ b/scripts/install @@ -65,7 +65,6 @@ export WITH_DOCKER=no # or source .env ? # Using this for now ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "erl -s halt" ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no mix local.hex --force" # install Hex in non-interractive way ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just config-basic" #ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just mix bonfire.deps .update" From 2cf302341e6c2f7b910c90a489e007e4cd438417 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 20 Jan 2024 23:29:19 +0100 Subject: [PATCH 183/218] let's try mise again --- manifest.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/manifest.toml b/manifest.toml index 8d3bb23..0a9c6b8 100644 --- a/manifest.toml +++ b/manifest.toml @@ -115,9 +115,9 @@ ram.runtime = "500M" ### Elixir 13 dependency - instead of v15 for now - extras.elixir13.repo = "deb https://packages.erlang-solutions.com/debian bullseye contrib" - extras.elixir13.key = "https://packages.erlang-solutions.com/debian/erlang_solutions.asc" - extras.elixir13.packages = ["elixir"] + #extras.elixir13.repo = "deb https://packages.erlang-solutions.com/debian bullseye contrib" + #extras.elixir13.key = "https://packages.erlang-solutions.com/debian/erlang_solutions.asc" + #extras.elixir13.packages = ["elixir"] ### Elixir 15 dependency # Bulleyes comes with v1.10 instead of v1.15 that is required # ynh_install_extra_app_dependencies --repo="https://packages.erlang-solutions.com/debian bullseye contrib" --package="elixir-lang" --key='https://packages.erlang-solutions.com/debian/erlang_solutions.asc' @@ -128,9 +128,9 @@ ram.runtime = "500M" #extras.elixir15.packages = ["elixir"] # exlang-dev -> https://github.com/elixir-lang/ex_doc/pull/1442/files # Debian default package is newer (enough), don't use this custom repo ### Elixir 15 with mise - #extras.mise.repo = "deb https://mise.jdx.dev/deb stable main" - #extras.mise.key = "https://mise.jdx.dev/gpg-key.pub" - #extras.mise.packages = ["mise"] + extras.mise.repo = "deb https://mise.jdx.dev/deb stable main" + extras.mise.key = "https://mise.jdx.dev/gpg-key.pub" + extras.mise.packages = ["mise"] ### just dependency # TODO : this is unsafe and should be dealt with in a better way. From 28784be3fdc9754f7b0c4ea102f72d47a6f59bd3 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 20 Jan 2024 23:31:40 +0100 Subject: [PATCH 184/218] add mise + erlang pluging --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index d3f5b3f..4c75171 100644 --- a/scripts/install +++ b/scripts/install @@ -65,6 +65,8 @@ export WITH_DOCKER=no # or source .env ? # Using this for now ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir +ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "mise plugin add erlang https://github.com/asdf-vm/asdf-erlang.git" # add erlang as source +ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "mise install" # install Elixir ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no mix local.hex --force" # install Hex in non-interractive way ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just config-basic" #ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just mix bonfire.deps .update" From 9ce0a27a74be6455851d4106b31b53ac7bef4076 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 20 Jan 2024 23:33:13 +0100 Subject: [PATCH 185/218] compatibility with Erlang 1.13 --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 0a9c6b8..ded664f 100644 --- a/manifest.toml +++ b/manifest.toml @@ -89,8 +89,8 @@ ram.runtime = "500M" [resources.sources] [resources.sources.main] - url = "https://github.com/bonfire-networks/bonfire-app/archive/7a43fd2202c6c442813cce944ba867419fee786e.tar.gz" - sha256 = "617a7469a3bafe632d104e99f21ae4026b8c9bb545c662ecb8d3413bc02b3ab9" + url = "https://github.com/bonfire-networks/bonfire-app/archive/b3aae6292790e79a891cc9e93ecbda1400035f1d.tar.gz" + sha256 = "6bcb435160ebee6e23d29fda17c1603ad8bcf015f54ef6c960e430242bc07bd5" [resources.ports] From 75f37a383fd3732d632823e09f69219f6ade1eb8 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 20 Jan 2024 23:33:50 +0100 Subject: [PATCH 186/218] back to normal Elixir 13 --- manifest.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/manifest.toml b/manifest.toml index ded664f..03d1e8c 100644 --- a/manifest.toml +++ b/manifest.toml @@ -115,9 +115,9 @@ ram.runtime = "500M" ### Elixir 13 dependency - instead of v15 for now - #extras.elixir13.repo = "deb https://packages.erlang-solutions.com/debian bullseye contrib" - #extras.elixir13.key = "https://packages.erlang-solutions.com/debian/erlang_solutions.asc" - #extras.elixir13.packages = ["elixir"] + extras.elixir13.repo = "deb https://packages.erlang-solutions.com/debian bullseye contrib" + extras.elixir13.key = "https://packages.erlang-solutions.com/debian/erlang_solutions.asc" + extras.elixir13.packages = ["elixir"] ### Elixir 15 dependency # Bulleyes comes with v1.10 instead of v1.15 that is required # ynh_install_extra_app_dependencies --repo="https://packages.erlang-solutions.com/debian bullseye contrib" --package="elixir-lang" --key='https://packages.erlang-solutions.com/debian/erlang_solutions.asc' @@ -128,9 +128,9 @@ ram.runtime = "500M" #extras.elixir15.packages = ["elixir"] # exlang-dev -> https://github.com/elixir-lang/ex_doc/pull/1442/files # Debian default package is newer (enough), don't use this custom repo ### Elixir 15 with mise - extras.mise.repo = "deb https://mise.jdx.dev/deb stable main" - extras.mise.key = "https://mise.jdx.dev/gpg-key.pub" - extras.mise.packages = ["mise"] + #extras.mise.repo = "deb https://mise.jdx.dev/deb stable main" + #extras.mise.key = "https://mise.jdx.dev/gpg-key.pub" + #extras.mise.packages = ["mise"] ### just dependency # TODO : this is unsafe and should be dealt with in a better way. From 30b41cba8a5b7915f835b2279e918cafab0f3372 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 20 Jan 2024 23:34:11 +0100 Subject: [PATCH 187/218] back to normal Elixir 13 --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 4c75171..bb7473a 100644 --- a/scripts/install +++ b/scripts/install @@ -65,8 +65,8 @@ export WITH_DOCKER=no # or source .env ? # Using this for now ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir -ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "mise plugin add erlang https://github.com/asdf-vm/asdf-erlang.git" # add erlang as source -ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "mise install" # install Elixir +#ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "mise plugin add erlang https://github.com/asdf-vm/asdf-erlang.git" # add erlang as source +#ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "mise install" # install Elixir ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no mix local.hex --force" # install Hex in non-interractive way ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just config-basic" #ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just mix bonfire.deps .update" From adc4310aefb33bad08a33c58f9850beb8a71ae6f Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 09:39:09 +0100 Subject: [PATCH 188/218] debug justfile content --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index bb7473a..b3a3892 100644 --- a/scripts/install +++ b/scripts/install @@ -81,6 +81,7 @@ export TERMINFO=/etc/terminfo ynh_replace_string --match_string="npm install --global" --replace_string="npm install" --target_file="$install_dir/justfile" #ynh_replace_string --match_string="npx" --replace_string="$ynh_npm exec --" --target_file="$install_dir/justfile" #ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "$ynh_node_load_PATH cat $install_dir/justfile" +ynh_exec_warn sed -n 595,610p $install_dir/justfile ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no $ynh_node_load_PATH just rel-build" #ynh_exec_warn_less just rel-build # node needs (root) access to /usr/local/lib/node_modules From 3cdcde28e0c1cf27d9a6384a42365f81ba87b13a Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 12:08:03 +0100 Subject: [PATCH 189/218] use node_load_path + check node version --- scripts/install | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index b3a3892..468c7f7 100644 --- a/scripts/install +++ b/scripts/install @@ -65,11 +65,12 @@ export WITH_DOCKER=no # or source .env ? # Using this for now ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "node -v" #ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "mise plugin add erlang https://github.com/asdf-vm/asdf-erlang.git" # add erlang as source #ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "mise install" # install Elixir -ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no mix local.hex --force" # install Hex in non-interractive way -ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just config-basic" -#ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just mix bonfire.deps .update" +ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no $ynh_node_load_PATH mix local.hex --force" # install Hex in non-interractive way +ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no $ynh_node_load_PATH just config-basic" +#ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no $ynh_node_load_PATH just mix bonfire.deps .update" #================================================= # Building the release From be359970063102818c90431a74a18877407c2729 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 12:14:03 +0100 Subject: [PATCH 190/218] debug ynh_node version --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index 468c7f7..eeba3cc 100644 --- a/scripts/install +++ b/scripts/install @@ -66,6 +66,7 @@ export WITH_DOCKER=no # or source .env ? # Using this for now ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "node -v" +ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "$ynh_node -v" #ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "mise plugin add erlang https://github.com/asdf-vm/asdf-erlang.git" # add erlang as source #ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "mise install" # install Elixir ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no $ynh_node_load_PATH mix local.hex --force" # install Hex in non-interractive way From a6b9a7c090c50212888f57f4fa2631ac28873a15 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 12:30:45 +0100 Subject: [PATCH 191/218] remove some debug --- scripts/install | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scripts/install b/scripts/install index eeba3cc..c5d74b5 100644 --- a/scripts/install +++ b/scripts/install @@ -65,8 +65,6 @@ export WITH_DOCKER=no # or source .env ? # Using this for now ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "node -v" -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "$ynh_node -v" #ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "mise plugin add erlang https://github.com/asdf-vm/asdf-erlang.git" # add erlang as source #ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "mise install" # install Elixir ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no $ynh_node_load_PATH mix local.hex --force" # install Hex in non-interractive way @@ -81,11 +79,7 @@ export TERM=linux # why is that not defined ? export TERMINFO=/etc/terminfo ### DONT USE GLOBAL NPM INSTALL ynh_replace_string --match_string="npm install --global" --replace_string="npm install" --target_file="$install_dir/justfile" -#ynh_replace_string --match_string="npx" --replace_string="$ynh_npm exec --" --target_file="$install_dir/justfile" -#ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "$ynh_node_load_PATH cat $install_dir/justfile" -ynh_exec_warn sed -n 595,610p $install_dir/justfile ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no $ynh_node_load_PATH just rel-build" -#ynh_exec_warn_less just rel-build # node needs (root) access to /usr/local/lib/node_modules #================================================= # START SYSTEMD SERVICE - Run the release From c8363b2d7c965594c3cd93ec9b83a673cdfdc78d Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 12:49:02 +0100 Subject: [PATCH 192/218] use proper YNH NODE --- conf/systemd.service | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/conf/systemd.service b/conf/systemd.service index 5633bbe..d825c0a 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,10 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ -ExecStart=WITH_DOCKER=no just cmd __INSTALL_DIR__/_build/prod/rel/bonfire/bin/bonfire start daemon +Environment=NODE_ENV=production +Environment=NODE_CONFIG_DIR=__INSTALL_DIR__/config +Environment="__YNH_NODE_LOAD_PATH__" +ExecStart=WITH_DOCKER=no __YNH_NODE__ just cmd __INSTALL_DIR__/_build/prod/rel/bonfire/bin/bonfire start daemon StandardOutput=append:/var/log/__APP__/__APP__.log StandardError=inherit From 951449f5ef63cf1793edb44cff6e6e28bfb9d1a6 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 12:49:46 +0100 Subject: [PATCH 193/218] Update systemd.service --- conf/systemd.service | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/systemd.service b/conf/systemd.service index d825c0a..d00e583 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,7 +8,6 @@ User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ Environment=NODE_ENV=production -Environment=NODE_CONFIG_DIR=__INSTALL_DIR__/config Environment="__YNH_NODE_LOAD_PATH__" ExecStart=WITH_DOCKER=no __YNH_NODE__ just cmd __INSTALL_DIR__/_build/prod/rel/bonfire/bin/bonfire start daemon StandardOutput=append:/var/log/__APP__/__APP__.log From f27a135aac67beba3ecf12f3c62f382f7c085b45 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 13:24:41 +0100 Subject: [PATCH 194/218] add RAM usage info (build) --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 03d1e8c..6a5ae93 100644 --- a/manifest.toml +++ b/manifest.toml @@ -26,7 +26,7 @@ architectures = "all" ldap = false sso = false disk = "2000M" -ram.build = "300M" +ram.build = "1500M" ram.runtime = "500M" [install] From 43714541cc701bd0d66c0b2744d120822d7ae307 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 13:30:27 +0100 Subject: [PATCH 195/218] warning about building time --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index c5d74b5..46f4890 100644 --- a/scripts/install +++ b/scripts/install @@ -74,7 +74,7 @@ ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no $ynh_node_load #================================================= # Building the release #================================================= -ynh_script_progression --message="Building Bonfire release..." --weight=1 +ynh_script_progression --message="Building Bonfire release... (This will take a long time)" --weight=1 export TERM=linux # why is that not defined ? export TERMINFO=/etc/terminfo ### DONT USE GLOBAL NPM INSTALL From 246d7229677c944ea7fce6fe5e91d58af1884aea Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 13:40:08 +0100 Subject: [PATCH 196/218] v0.9.8-beta 26 --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 6a5ae93..cf07f6e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -3,7 +3,7 @@ packaging_format = 2 id = "bonfire" name = "Bonfire" -version = "0.9.6~ynh5" +version = "0.9.8~ynh1" maintainers = ["Lapineige"] From f43e4ea30d288dd3ba894ef801e08e72352506c3 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 21 Jan 2024 12:40:11 +0000 Subject: [PATCH 197/218] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8fb592f..9d8eb0d 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Federated social networking server built on ActivityPub open protocol -**Shipped version:** 0.9.6~ynh5 +**Shipped version:** 0.9.8~ynh1 **Demo:** https://playground.bonfire.cafe/ ## Documentation and resources diff --git a/README_fr.md b/README_fr.md index a5063c8..2392c40 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Serveur de réseautage social fédéré basé sur le protocole ouvert ActivityPub -**Version incluse :** 0.9.6~ynh5 +**Version incluse :** 0.9.8~ynh1 **Démo :** https://playground.bonfire.cafe/ ## Documentations et ressources From 9905140b3c3c2d16bef701ba6b26c731f9f0cd5b Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 13:45:55 +0100 Subject: [PATCH 198/218] add inotify-tools --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index cf07f6e..fbf0714 100644 --- a/manifest.toml +++ b/manifest.toml @@ -104,7 +104,7 @@ ram.runtime = "500M" [resources.apt] - packages = "erlang-dev erlang-parsetools erlang-os-mon erlang-tools erlang-xmerl postgresql npm node-postcss" + packages = "erlang-dev erlang-parsetools erlang-os-mon erlang-tools erlang-xmerl postgresql npm node-postcss inotify-tools" ##### (this part is optional and corresponds to the legacy ynh_install_extra_app_dependencies helper) From c8f1fe98a00cfa6387377524cec848494d65e5d0 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 13:54:55 +0100 Subject: [PATCH 199/218] inotify-tools is not needed https://github.com/YunoHost-Apps/bonfire_ynh/pull/2/#issuecomment-1902618107 --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index fbf0714..cf07f6e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -104,7 +104,7 @@ ram.runtime = "500M" [resources.apt] - packages = "erlang-dev erlang-parsetools erlang-os-mon erlang-tools erlang-xmerl postgresql npm node-postcss inotify-tools" + packages = "erlang-dev erlang-parsetools erlang-os-mon erlang-tools erlang-xmerl postgresql npm node-postcss" ##### (this part is optional and corresponds to the legacy ynh_install_extra_app_dependencies helper) From af47664bbd6e9dc745e8bbeee957fbaeb59f4e47 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 14:20:26 +0100 Subject: [PATCH 200/218] build again on upgrade --- scripts/upgrade | 55 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 9 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index e31fa34..53e1d3d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -11,6 +11,13 @@ source /usr/share/yunohost/helpers upgrade_type=$(ynh_check_app_version_changed) +#================================================= +# STOP SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Stopping a systemd service..." + +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" + #================================================= # "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...) #================================================= @@ -27,24 +34,54 @@ fi chown -R $app:www-data "$install_dir" +================================================= +# Building the release #================================================= -# REAPPLY SYSTEM CONFIGURATIONS -#================================================= -ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 - -ynh_add_nginx_config +ynh_script_progression --message="Building Bonfire release... (This will take a long time)" --weight=1 +export TERM=linux # why is that not defined ? +export TERMINFO=/etc/terminfo +### DONT USE GLOBAL NPM INSTALL +ynh_replace_string --match_string="npm install --global" --replace_string="npm install" --target_file="$install_dir/justfile" +ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no $ynh_node_load_PATH just rel-build" #================================================= # RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...) #================================================= # UPDATE A CONFIG FILE #================================================= -#ynh_script_progression --message="Updating a configuration file..." --weight=1 +ynh_script_progression --message="Updating a configuration file... (this will remove any manual change you could have made before)" --weight=1 -#ynh_add_config --template="some_config_file" --destination="$install_dir/some_config_file" +ynh_add_config --template=".env" --destination="$install_dir/.env" -#chmod 400 "$install_dir/some_config_file" -#chown $app:$app "$install_dir/some_config_file" +chmod 400 "$install_dir/.env" +chown $app:$app "$install_dir/.env" + +#================================================= +# REAPPLY SYSTEM CONFIGURATIONS + Run the service +#================================================= +ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 + +# Create a dedicated NGINX config +ynh_add_nginx_config + +# Create a dedicated systemd config +ynh_add_systemd_config + +mkdir -p "/var/log/$app" +chown -R $app:$app "/var/log/$app" + +# Use logrotate to manage app-specific logfile(s) +ynh_use_logrotate --non-append + +# Create a dedicated systemd config +ynh_add_systemd_config + +yunohost service add $app --description="Bonfire daemon" --log="/var/log/$app/$app.log" + +ynh_script_progression --message="Starting Bonfire daemon service..." --weight=1 + +# Start a systemd service +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" #================================================= # END OF SCRIPT From 63e2431564aa3c54b36c41a9d3656cc71fbe5d4b Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 14:26:32 +0100 Subject: [PATCH 201/218] use version in Nginx conf https://github.com/bonfire-networks/bonfire-app/commit/43a2bc2595bea4a41a3e6ed2661f30c526cd014d version source : https://github.com/bonfire-networks/bonfire-app/blob/b3aae6292790e79a891cc9e93ecbda1400035f1d/mix.exs#L99 --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index ea36772..e159532 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,7 +2,7 @@ location __PATH__/ { # Path to source - alias __INSTALL_DIR__/_build/prod/rel/bonfire/lib/bonfire-0.1.0-*/priv/static; + alias __INSTALL_DIR__/_build/prod/rel/bonfire/lib/bonfire-0.9.8-beta.26/priv/static; # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; From 31898b4486ad7a266f58becda9fd73d6f42e0a41 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 14:28:18 +0100 Subject: [PATCH 202/218] lastest commit --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index cf07f6e..a16dad7 100644 --- a/manifest.toml +++ b/manifest.toml @@ -3,7 +3,7 @@ packaging_format = 2 id = "bonfire" name = "Bonfire" -version = "0.9.8~ynh1" +version = "0.9.8-beta.26~ynh2" maintainers = ["Lapineige"] @@ -89,8 +89,8 @@ ram.runtime = "500M" [resources.sources] [resources.sources.main] - url = "https://github.com/bonfire-networks/bonfire-app/archive/b3aae6292790e79a891cc9e93ecbda1400035f1d.tar.gz" - sha256 = "6bcb435160ebee6e23d29fda17c1603ad8bcf015f54ef6c960e430242bc07bd5" + url = "https://github.com/bonfire-networks/bonfire-app/archive/43a2bc2595bea4a41a3e6ed2661f30c526cd014d.tar.gz" + sha256 = "bc0697ce49d9316a9990a684d403aa1e5bf050ce04e5d12f296a4424a18568b9" [resources.ports] From 57e2f74d654007503188922cf7160a41c195a5dd Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 21 Jan 2024 13:28:21 +0000 Subject: [PATCH 203/218] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9d8eb0d..040bf1e 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Federated social networking server built on ActivityPub open protocol -**Shipped version:** 0.9.8~ynh1 +**Shipped version:** 0.9.8-beta.26~ynh2 **Demo:** https://playground.bonfire.cafe/ ## Documentation and resources diff --git a/README_fr.md b/README_fr.md index 2392c40..32e4c56 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Serveur de réseautage social fédéré basé sur le protocole ouvert ActivityPub -**Version incluse :** 0.9.8~ynh1 +**Version incluse :** 0.9.8-beta.26~ynh2 **Démo :** https://playground.bonfire.cafe/ ## Documentations et ressources From 7b5f9dae7eeea03d1184a5b6fdca429edc88c696 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 14:32:31 +0100 Subject: [PATCH 204/218] latest commit https://github.com/YunoHost-Apps/bonfire_ynh/pull/2/#issuecomment-1902630340 --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index a16dad7..f803f86 100644 --- a/manifest.toml +++ b/manifest.toml @@ -89,8 +89,8 @@ ram.runtime = "500M" [resources.sources] [resources.sources.main] - url = "https://github.com/bonfire-networks/bonfire-app/archive/43a2bc2595bea4a41a3e6ed2661f30c526cd014d.tar.gz" - sha256 = "bc0697ce49d9316a9990a684d403aa1e5bf050ce04e5d12f296a4424a18568b9" + url = "https://github.com/bonfire-networks/bonfire-app/archive/289ad2d8b57a2ce9a7ce609f000b1ac5d887e7a0.tar.gz" + sha256 = "5b79032647f9fd95465692d1de48839359dfa532a72c727f76bf03a1b68e8cdd" [resources.ports] From 4807d0303329f83e70e8355d182cc4ef8042a170 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 14:51:32 +0100 Subject: [PATCH 205/218] add flavour --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index e159532..9860611 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,7 +2,7 @@ location __PATH__/ { # Path to source - alias __INSTALL_DIR__/_build/prod/rel/bonfire/lib/bonfire-0.9.8-beta.26/priv/static; + alias __INSTALL_DIR__/_build/prod/rel/bonfire/lib/bonfire-0.9.8-classic-beta.26/priv/static; # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; From fabbaff4cc78000815e97f77ce90c434c6bab104 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 15:18:43 +0100 Subject: [PATCH 206/218] fix syntax --- conf/.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/.env b/conf/.env index cf052a1..826bd69 100644 --- a/conf/.env +++ b/conf/.env @@ -20,7 +20,7 @@ INVITE_ONLY=true # uncomment in order to NOT automatically change the database schema when you upgrade the app # DISABLE_DB_AUTOMIGRATION=true # max file upload size (default is 20 meg) -UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE +UPLOAD_LIMIT=__MEDIA_UPLOAD_SIZE__ # ==================================== # You should not have to edit any of the following ones: POSTGRES_HOST=localhost From 305112232935757c309048c33460b37c58166801 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 15:33:14 +0100 Subject: [PATCH 207/218] increase secret key length --- scripts/install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 46f4890..0f705d8 100644 --- a/scripts/install +++ b/scripts/install @@ -40,11 +40,11 @@ ynh_add_nginx_config # ADD A CONFIGURATION #================================================= ## Generate secrets and other config values -secret_key_base=$(ynh_string_random --length=24) -signing_salt=$(ynh_string_random --length=24) -encryption_salt=$(ynh_string_random --length=24) +secret_key_base=$(ynh_string_random --length=50) +signing_salt=$(ynh_string_random --length=50) +encryption_salt=$(ynh_string_random --length=50) # search -meili_master_key=$(ynh_string_random --length=24) +meili_master_key=$(ynh_string_random --length=50) # max file upload size MEDIA_UPLOAD_SIZE="${media_upload_size//[!0-9]/}000000" From 06430864a9aceb8fee3c1689b1ea5779aec9243f Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 15:52:48 +0100 Subject: [PATCH 208/218] use smtp, not sendmail (not compatible) https://github.com/YunoHost-Apps/bonfire_ynh/pull/2/#issuecomment-1902661376 --- conf/.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/.env b/conf/.env index 826bd69..203b99c 100644 --- a/conf/.env +++ b/conf/.env @@ -11,7 +11,7 @@ SERVER_PORT=__PORT__ # port your visitors will access (typically 80 or 443, will be different than SERVER_PORT only if using a reverse proxy) PUBLIC_PORT=443 # what service to use for sending out emails (eg. smtp, mailgun, none) NOTE: you should also set the corresponding keys in secrets section -MAIL_BACKEND=sendmail +MAIL_BACKEND=smtp # hostname and port of meili search index SEARCH_MEILI_INSTANCE=http://localhost:7700 # require an email address to be invited before being able to sign up From d296bbcf411547940714e122839463bf7fa74fc6 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 16:17:20 +0100 Subject: [PATCH 209/218] proper mail config --- conf/.env | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/conf/.env b/conf/.env index 203b99c..0c1fcbd 100644 --- a/conf/.env +++ b/conf/.env @@ -10,8 +10,6 @@ HOSTNAME=__DOMAIN__ SERVER_PORT=__PORT__ # port your visitors will access (typically 80 or 443, will be different than SERVER_PORT only if using a reverse proxy) PUBLIC_PORT=443 -# what service to use for sending out emails (eg. smtp, mailgun, none) NOTE: you should also set the corresponding keys in secrets section -MAIL_BACKEND=smtp # hostname and port of meili search index SEARCH_MEILI_INSTANCE=http://localhost:7700 # require an email address to be invited before being able to sign up @@ -48,12 +46,13 @@ POSTGRES_PASSWORD=__DB_PWD__ # password for the search index MEILI_MASTER_KEY=__MEILI_MASTER_KEY__ -## TODO -# email deliverym if you use mailgun.com, edit with your domain and API key +# what service to use for sending out emails (eg. smtp, mailgun, none) NOTE: you should also set the corresponding keys in secrets section +MAIL_BACKEND=smtp MAIL_DOMAIN=__DOMAIN__ -MAIL_USERNAME=__APP__ -MAIL_KEY=__MAIL_PWD__ -MAIL_FROM=__APP__@__DOMAIN__ +MAIL_PASSWORD=__MAIL_PWD__ +MAIL_USER=__APP__ +MAIL_SERVER=__DOMAIN__ +MAIL_PORT=587 # TODO : Configure S3 - with proper Yunohost question during installation # Uploads From 24e499e357f32f5087222598ec7a55ad38cee3d9 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 16:29:47 +0100 Subject: [PATCH 210/218] restore systemd --- scripts/restore | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index f489d88..e60c564 100644 --- a/scripts/restore +++ b/scripts/restore @@ -29,12 +29,28 @@ ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./d #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= -# RESTORE THE PHP-FPM CONFIGURATION -#================================================= ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_restore_file --origin_path="/etc/systemd/system/$app.service" +systemctl enable $app.service --quiet + +mkdir -p "/var/log/$app" +chown -R $app:$app "/var/log/$app" +ynh_restore_file --origin_path="/etc/logrotate.d/$app" + +yunohost service add $app --description="Bonfire daemon" --log="/var/log/$app/$app.log" + +#================================================= +# START SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Starting Bonfire daemon service..." --weight=1 + +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" + +ynh_systemd_action --service_name=nginx --action=reload + #================================================= # GENERIC FINALIZATION #================================================= From 4a6148e20ae4ad0ce5e5f2ae0d94a4bd2c76e012 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 16:37:26 +0100 Subject: [PATCH 211/218] check if service is started correctly --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 0f705d8..69c0252 100644 --- a/scripts/install +++ b/scripts/install @@ -103,7 +103,7 @@ yunohost service add $app --description="Bonfire daemon" --log="/var/log/$app/$a ynh_script_progression --message="Starting Bonfire daemon service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="[info] Running Bonfire.Web.Endpoint" #================================================= # END OF SCRIPT From 8f1ff516534c70d162d6bf33f839366fcbfb45ea Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 16:37:54 +0100 Subject: [PATCH 212/218] check if service is started correctly --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 53e1d3d..b5a91c3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -81,7 +81,7 @@ yunohost service add $app --description="Bonfire daemon" --log="/var/log/$app/$a ynh_script_progression --message="Starting Bonfire daemon service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="[info] Running Bonfire.Web.Endpoint" #================================================= # END OF SCRIPT From db02fe0de7fa9198c40c420dc8cad81e814ef53b Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 16:38:00 +0100 Subject: [PATCH 213/218] check if service is started correctly --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index e60c564..868ff95 100644 --- a/scripts/restore +++ b/scripts/restore @@ -47,7 +47,7 @@ yunohost service add $app --description="Bonfire daemon" --log="/var/log/$app/$a #================================================= ynh_script_progression --message="Starting Bonfire daemon service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="[info] Running Bonfire.Web.Endpoint" ynh_systemd_action --service_name=nginx --action=reload From 4a325a50318e46cb16df1c8ec346f3d1674a7047 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 16:56:36 +0100 Subject: [PATCH 214/218] create log folder --- scripts/install | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 69c0252..13d202b 100644 --- a/scripts/install +++ b/scripts/install @@ -94,12 +94,17 @@ release_folder="_build/prod/rel/bonfire" #ynh_script_progression --message="Starting Bonfire..." --weight=1 #ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no just cmd $release_folder/bin/bonfire start" +mkdir -p "/var/log/$app" +chown -R $app:$app "/var/log/$app" + +# Use logrotate to manage application logfile(s) +ynh_use_logrotate + # Create a dedicated systemd config ynh_add_systemd_config yunohost service add $app --description="Bonfire daemon" --log="/var/log/$app/$app.log" - ynh_script_progression --message="Starting Bonfire daemon service..." --weight=1 # Start a systemd service From ad2338cbf39fe1b2cf1c73c26530a0ff4015aa94 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 17:01:08 +0100 Subject: [PATCH 215/218] Update nginx.conf https://github.com/YunoHost-Apps/bonfire_ynh/pull/2/#issuecomment-1902678872 --- conf/nginx.conf | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 9860611..7f1ce15 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,18 +1,27 @@ -#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +location @app_upstream { + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $http_host; + + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + proxy_pass http://127.0.0.1:__PORT__; + proxy_redirect off; + proxy_read_timeout 240s; +} + location __PATH__/ { - # Path to source - alias __INSTALL_DIR__/_build/prod/rel/bonfire/lib/bonfire-0.9.8-classic-beta.26/priv/static; + root /var/www/bonfire/_build/prod/rel/bonfire/lib/bonfire-0.9.8-classic-beta.26/priv/static; + + index index.html; # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; -} -location /live/websocket { - proxy_pass http://127.0.0.1:__PORT__; - - # these configurations are necessary to proxy WebSocket requests - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; + + try_files $uri $uri.html $uri/index.html $uri/ @app_upstream; + } From 07292b240657a75fda258af0f5d13fd9bffef4a9 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 17:05:18 +0100 Subject: [PATCH 216/218] fix systemd --- conf/systemd.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/systemd.service b/conf/systemd.service index d00e583..67de51f 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -9,7 +9,7 @@ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ Environment=NODE_ENV=production Environment="__YNH_NODE_LOAD_PATH__" -ExecStart=WITH_DOCKER=no __YNH_NODE__ just cmd __INSTALL_DIR__/_build/prod/rel/bonfire/bin/bonfire start daemon +ExecStart=just cmd __INSTALL_DIR__/_build/prod/rel/bonfire/bin/bonfire start daemon StandardOutput=append:/var/log/__APP__/__APP__.log StandardError=inherit From 613ee0c6902fbb09f0eeb4df1219cf13e8ca32bf Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 21 Jan 2024 17:31:28 +0100 Subject: [PATCH 217/218] Update nginx.conf From linter - In nginx.conf : please don't use $http_host but $host instead. C.f. https://github.com/yandex/gixy/blob/master/docs/en/plugins/hostspoofing.md --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 7f1ce15..2670423 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,7 +1,7 @@ location @app_upstream { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; - proxy_set_header Host $http_host; + proxy_set_header Host $host; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; From e8052611e81786f76e928d295d4254838437eb73 Mon Sep 17 00:00:00 2001 From: lapineige Date: Mon, 22 Jan 2024 22:11:14 +0100 Subject: [PATCH 218/218] typo --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index b5a91c3..66c276c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -34,7 +34,7 @@ fi chown -R $app:www-data "$install_dir" -================================================= +#================================================= # Building the release #================================================= ynh_script_progression --message="Building Bonfire release... (This will take a long time)" --weight=1