diff --git a/ALL_README.md b/ALL_README.md
new file mode 100644
index 0000000..a01b345
--- /dev/null
+++ b/ALL_README.md
@@ -0,0 +1,7 @@
+# All available README files by language
+
+- [Read the README in English](README.md)
+- [Irakurri README euskaraz](README_eu.md)
+- [Lire le README en français](README_fr.md)
+- [Le o README en galego](README_gl.md)
+- [阅读中文(简体)的 README](README_zh_Hans.md)
diff --git a/README.md b/README.md
index 040bf1e..a8a59e6 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
@@ -9,34 +9,34 @@ It shall NOT be edited by hand.
[](https://install-app.yunohost.org/?app=bonfire)
-*[Lire ce readme en français.](./README_fr.md)*
+*[Read this README in other languages.](./ALL_README.md)*
-> *This package allows you to install Bonfire quickly and simply on a YunoHost server.
-If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
+> *This package allows you to install Bonfire quickly and simply on a YunoHost server.*
+> *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.*
## Overview
Federated social networking server built on ActivityPub open protocol
-**Shipped version:** 0.9.8-beta.26~ynh2
+**Shipped version:** 0.9.8-beta.26~ynh3
-**Demo:** https://playground.bonfire.cafe/
+**Demo:**
## Documentation and resources
-* Official app website:
-* Official user documentation:
-* Official admin documentation:
-* Upstream app code repository:
-* YunoHost Store:
-* Report a bug:
+- Official app website:
+- Official user documentation:
+- Official admin documentation:
+- Upstream app code repository:
+- YunoHost Store:
+- Report a bug:
## Developer info
-Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/bonfire_ynh/tree/testing).
+Please send your pull request to the [`testing` branch](https://github.com/YunoHost-Apps/bonfire_ynh/tree/testing).
-To try the testing branch, please proceed like that.
+To try the `testing` branch, please proceed like that:
-``` bash
+```bash
sudo yunohost app install https://github.com/YunoHost-Apps/bonfire_ynh/tree/testing --debug
or
sudo yunohost app upgrade bonfire -u https://github.com/YunoHost-Apps/bonfire_ynh/tree/testing --debug
diff --git a/README_eu.md b/README_eu.md
new file mode 100644
index 0000000..f450c82
--- /dev/null
+++ b/README_eu.md
@@ -0,0 +1,45 @@
+
+
+# Bonfire YunoHost-erako
+
+[](https://dash.yunohost.org/appci/app/bonfire)  
+
+[](https://install-app.yunohost.org/?app=bonfire)
+
+*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)*
+
+> *Pakete honek Bonfire YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.*
+> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.*
+
+## Aurreikuspena
+
+
+
+**Paketatutako bertsioa:** 0.9.8-beta.26~ynh3
+
+**Demoa:**
+## Dokumentazioa eta baliabideak
+
+- Aplikazioaren webgune ofiziala:
+- Erabiltzaileen dokumentazio ofiziala:
+- Administratzaileen dokumentazio ofiziala:
+- Jatorrizko aplikazioaren kode-gordailua:
+- YunoHost Denda:
+- Eman errore baten berri:
+
+## Garatzaileentzako informazioa
+
+Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/bonfire_ynh/tree/testing).
+
+`testing` abarra probatzeko, ondorengoa egin:
+
+```bash
+sudo yunohost app install https://github.com/YunoHost-Apps/bonfire_ynh/tree/testing --debug
+edo
+sudo yunohost app upgrade bonfire -u https://github.com/YunoHost-Apps/bonfire_ynh/tree/testing --debug
+```
+
+**Informazio gehiago aplikazioaren paketatzeari buruz:**
diff --git a/README_fr.md b/README_fr.md
index 32e4c56..05420df 100644
--- a/README_fr.md
+++ b/README_fr.md
@@ -1,6 +1,6 @@
# Bonfire pour YunoHost
@@ -9,37 +9,37 @@ It shall NOT be edited by hand.
[](https://install-app.yunohost.org/?app=bonfire)
-*[Read this readme in english.](./README.md)*
+*[Lire le README dans d'autres langues.](./ALL_README.md)*
-> *Ce package vous permet d’installer Bonfire rapidement et simplement sur un serveur YunoHost.
-Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.*
+> *Ce package vous permet d’installer Bonfire rapidement et simplement sur un serveur YunoHost.*
+> *Si vous n’avez pas YunoHost, consultez [ce guide](https://yunohost.org/install) pour savoir comment l’installer et en profiter.*
## Vue d’ensemble
Serveur de réseautage social fédéré basé sur le protocole ouvert ActivityPub
-**Version incluse :** 0.9.8-beta.26~ynh2
+**Version incluse :** 0.9.8-beta.26~ynh3
-**Démo :** https://playground.bonfire.cafe/
+**Démo :**
## Documentations et ressources
-* Site officiel de l’app :
-* Documentation officielle utilisateur :
-* Documentation officielle de l’admin :
-* Dépôt de code officiel de l’app :
-* YunoHost Store:
-* Signaler un bug :
+- Site officiel de l’app :
+- Documentation officielle utilisateur :
+- Documentation officielle de l’admin :
+- Dépôt de code officiel de l’app :
+- YunoHost Store :
+- Signaler un bug :
## Informations pour les développeurs
-Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/bonfire_ynh/tree/testing).
+Merci de faire vos pull request sur la [branche `testing`](https://github.com/YunoHost-Apps/bonfire_ynh/tree/testing).
-Pour essayer la branche testing, procédez comme suit.
+Pour essayer la branche `testing`, procédez comme suit :
-``` bash
+```bash
sudo yunohost app install https://github.com/YunoHost-Apps/bonfire_ynh/tree/testing --debug
ou
sudo yunohost app upgrade bonfire -u https://github.com/YunoHost-Apps/bonfire_ynh/tree/testing --debug
```
-**Plus d’infos sur le packaging d’applications :**
\ No newline at end of file
+**Plus d’infos sur le packaging d’applications :**
diff --git a/README_gl.md b/README_gl.md
new file mode 100644
index 0000000..2433edb
--- /dev/null
+++ b/README_gl.md
@@ -0,0 +1,45 @@
+
+
+# Bonfire para YunoHost
+
+[](https://dash.yunohost.org/appci/app/bonfire)  
+
+[](https://install-app.yunohost.org/?app=bonfire)
+
+*[Le este README en outros idiomas.](./ALL_README.md)*
+
+> *Este paquete permíteche instalar Bonfire de xeito rápido e doado nun servidor YunoHost.*
+> *Se non usas YunoHost, le a [documentación](https://yunohost.org/install) para saber como instalalo.*
+
+## Vista xeral
+
+
+
+**Versión proporcionada:** 0.9.8-beta.26~ynh3
+
+**Demo:**
+## Documentación e recursos
+
+- Web oficial da app:
+- Documentación oficial para usuarias:
+- Documentación oficial para admin:
+- Repositorio de orixe do código:
+- Tenda YunoHost:
+- Informar dun problema:
+
+## Info de desenvolvemento
+
+Envía a túa colaboración á [rama `testing`](https://github.com/YunoHost-Apps/bonfire_ynh/tree/testing).
+
+Para probar a rama `testing`, procede deste xeito:
+
+```bash
+sudo yunohost app install https://github.com/YunoHost-Apps/bonfire_ynh/tree/testing --debug
+ou
+sudo yunohost app upgrade bonfire -u https://github.com/YunoHost-Apps/bonfire_ynh/tree/testing --debug
+```
+
+**Máis info sobre o empaquetado da app:**
diff --git a/README_zh_Hans.md b/README_zh_Hans.md
new file mode 100644
index 0000000..5cc7501
--- /dev/null
+++ b/README_zh_Hans.md
@@ -0,0 +1,45 @@
+
+
+# YunoHost 的 Bonfire
+
+[](https://dash.yunohost.org/appci/app/bonfire)  
+
+[](https://install-app.yunohost.org/?app=bonfire)
+
+*[阅读此 README 的其它语言版本。](./ALL_README.md)*
+
+> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 Bonfire。*
+> *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。*
+
+## 概况
+
+
+
+**分发版本:** 0.9.8-beta.26~ynh3
+
+**演示:**
+## 文档与资源
+
+- 官方应用网站:
+- 官方用户文档:
+- 官方管理文档:
+- 上游应用代码库:
+- YunoHost 商店:
+- 报告 bug:
+
+## 开发者信息
+
+请向 [`testing` 分支](https://github.com/YunoHost-Apps/bonfire_ynh/tree/testing) 发送拉取请求。
+
+如要尝试 `testing` 分支,请这样操作:
+
+```bash
+sudo yunohost app install https://github.com/YunoHost-Apps/bonfire_ynh/tree/testing --debug
+或
+sudo yunohost app upgrade bonfire -u https://github.com/YunoHost-Apps/bonfire_ynh/tree/testing --debug
+```
+
+**有关应用打包的更多信息:**
diff --git a/conf/.env b/conf/.env
index 0c1fcbd..0ab817c 100644
--- a/conf/.env
+++ b/conf/.env
@@ -1,3 +1,4 @@
+
MIX_ENV=prod
FLAVOUR=classic
@@ -82,3 +83,9 @@ GITHUB_TOKEN=
TX_TOKEN=
## END OF SECRETS ##
+
+ENABLE_IMAGE_VIX=1
+
+# enable these two if deps fetching is failing
+# HEX_HTTP_CONCURRENCY=1
+# HEX_HTTP_TIMEOUT=120
diff --git a/conf/systemd.service b/conf/systemd.service
index 67de51f..db155c0 100644
--- a/conf/systemd.service
+++ b/conf/systemd.service
@@ -7,9 +7,8 @@ Type=simple
User=__APP__
Group=__APP__
WorkingDirectory=__INSTALL_DIR__/
-Environment=NODE_ENV=production
-Environment="__YNH_NODE_LOAD_PATH__"
-ExecStart=just cmd __INSTALL_DIR__/_build/prod/rel/bonfire/bin/bonfire start daemon
+EnvironmentFile=__INSTALL_DIR__/.env
+ExecStart=__INSTALL_DIR__/bin/bonfire start daemon
StandardOutput=append:/var/log/__APP__/__APP__.log
StandardError=inherit
diff --git a/manifest.toml b/manifest.toml
index f803f86..aff22d6 100644
--- a/manifest.toml
+++ b/manifest.toml
@@ -3,7 +3,7 @@ packaging_format = 2
id = "bonfire"
name = "Bonfire"
-version = "0.9.8-beta.26~ynh2"
+version = "0.9.8-beta.26~ynh3"
maintainers = ["Lapineige"]
@@ -50,14 +50,16 @@ ram.runtime = "500M"
ask.fr = "Choisissez la langue de l'application"
type = "select"
choices = ["fr", "en"]
- default = "fr"
+ default = "en"
[install.admin]
type = "user"
+ help.fr = "Choisissez un compte Yunohost. Un compte Bonfire avec les mêmes identifiants (nom, email) sera créé."
+ help.en = "Choose a Yunohost account. A Bonfire account with the same credentials (name, email) will be created."
[install.password]
- help.en = "Use the help field to add an information for the admin about this question."
- help.fr = "Utilisez le champ aide pour ajouter une information à l'intention de l'administrateur à propos de cette question."
+ help.en = "Choose the password for this account with admin rights."
+ help.fr = "Choisissez le mot de passe de ce compte possédant les droits d'administration."
type = "password"
[install.media_upload_size]
@@ -89,8 +91,18 @@ ram.runtime = "500M"
[resources.sources]
[resources.sources.main]
- url = "https://github.com/bonfire-networks/bonfire-app/archive/289ad2d8b57a2ce9a7ce609f000b1ac5d887e7a0.tar.gz"
- sha256 = "5b79032647f9fd95465692d1de48839359dfa532a72c727f76bf03a1b68e8cdd"
+ # TODO: multiple architectures
+ url = "https://github.com/bonfire-networks/bonfire-app/releases/download/v0.9.10-beta.62/bonfire-classic-amd64-debian-bullseye.tar.gz"
+ sha256 = "8137473f6db89101a0d841f0aad5a243853c611c9ccf80433e682b0217f87f73"
+
+ autoupdate.strategy = "latest_github_release"
+
+ [resources.sources.deps_install]
+ url = "https://github.com/bonfire-networks/bonfire-app/raw/v0.9.10-beta.62/deps-debian.sh"
+ sha256 = "11c84b345ff6daacd08e156390315186f00d4bef3a4c8e15a8055fca0a4a3dee"
+ format = "script"
+ rename = "deps-debian.sh"
+ extract = false
[resources.ports]
@@ -104,20 +116,20 @@ ram.runtime = "500M"
[resources.apt]
- packages = "erlang-dev erlang-parsetools erlang-os-mon erlang-tools erlang-xmerl postgresql npm node-postcss"
+ packages = "postgresql"
##### (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"]
+ # 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"]
+ # 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'
@@ -136,9 +148,9 @@ ram.runtime = "500M"
# 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"]
+ # 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]
diff --git a/scripts/install b/scripts/install
index 13d202b..775b962 100644
--- a/scripts/install
+++ b/scripts/install
@@ -9,24 +9,31 @@
source _common.sh
source /usr/share/yunohost/helpers
-#=================================================
-# INSTALL DEPENDENCIES
-#=================================================
-ynh_script_progression --message="Installing nodejs..."
-
-ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
-ynh_use_nodejs
-
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Setting up source files..." --weight=1
+# Download deps install script
+ynh_setup_source --source_id=deps_install --dest_dir="$install_dir"
+
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
+chmod +x "$install_dir/deps-debian.sh"
+ls -la "$install_dir"
+
+#=================================================
+# INSTALL DEPENDENCIES
+#=================================================
+ynh_script_progression --message="Installing dependencies..."
+
+ynh_exec_warn_less "HOME=$install_dir $install_dir/deps-debian.sh"
+
+# ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
+# ynh_use_nodejs
#=================================================
# NGINX CONFIGURATION
@@ -55,36 +62,44 @@ ynh_store_file_checksum --file="$install_dir/.env"
chmod 400 "$install_dir/.env"
chown $app:$app "$install_dir/.env"
-
#=================================================
# SPECIFIC SETUP
#=================================================
-source $install_dir/.env
+# load .env into env
+export $(grep -v '^#' $install_dir/.env | xargs -d '\n')
+# source $install_dir/.env
export WITH_DOCKER=no # or source .env ? # Using this for now
+export TERM=linux # why is that not defined ?
+export TERMINFO=/etc/terminfo
+export PATH="$PATH:$install_dir/.local/share/mise/shims"
-ynh_script_progression --message="Configuring Bonfire release..." --weight=1
+ynh_script_progression --message="Preparing 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 $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"
+# ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$ynh_node_load_PATH mix local.hex --force" # install Hex in non-interractive way
+### DONT USE GLOBAL NPM INSTALL
+# ynh_replace_string --match_string="npm install --global" --replace_string="npm install" --target_file="$install_dir/justfile"
#=================================================
# Building the release
#=================================================
-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"
+# ynh_script_progression --message="Building Bonfire release... (this will take a long time)" --weight=1
+# 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"
+# ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "WITH_DOCKER=no $ynh_node_load_PATH just rel-build"
+
+#=================================================
+# CREATE ADMIN USER
+#=================================================
+# ynh_script_progression --message="Creating admin user account..." --weight=1
+# ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$install_dir/bin/bonfire eval 'Bonfire.Me.make_account_and_user(\"$admin\", \"$(ynh_user_get_info --username=\"$admin\" --key=mail)\", \"$password\")'"
#=================================================
# START SYSTEMD SERVICE - Run the release
#=================================================
-release_folder="_build/prod/rel/bonfire"
+release_folder=$install_dir
### Not running the migration, they are done on startup anyway
#ynh_script_progression --message="Running database migrations..." --weight=1
diff --git a/scripts/upgrade b/scripts/upgrade
index 66c276c..f537f9c 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -40,9 +40,10 @@ chown -R $app:www-data "$install_dir"
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"
+# 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...)