1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/akkoma_ynh.git synced 2024-09-03 20:36:17 +02:00

Merge pull request #8 from YunoHost-Apps/testing

[Testing] Change config file on install to enable admin UI configuration + install mangane
This commit is contained in:
lapineige 2023-01-14 13:09:46 +01:00 committed by GitHub
commit a6ec8d7b6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 6 deletions

View file

@ -7,7 +7,7 @@ location / {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:__PORT__;
proxy_pass http://127.0.0.1:__PORT__;
client_max_body_size 50M;

View file

@ -1,5 +1,5 @@
[Unit]
Description=__APP__ social network
Description=__APP__: social network
After=network.target postgresql.service nginx.service
[Service]

View file

@ -3,8 +3,8 @@
"id": "akkoma",
"packaging_format": 1,
"description": {
"en": "A free, federated social networking server built on ActivityPub open protocol. Derivate of Pleroma.",
"fr": "Un serveur de réseautage social fédéré et gratuit basé sur le protocole ouvert ActivityPub. Derivé de Pleroma."
"en": "Federated social networking server built on ActivityPub open protocol",
"fr": "Serveur de réseautage social fédéré basé sur le protocole ouvert ActivityPub"
},
"version": "3.5.0~ynh3",
"url": "https://akkoma.social/",
@ -61,7 +61,7 @@
"name": "registration",
"type": "boolean",
"ask": {
"en": "Should registration be open to users who do not have a Yunohost account on the system?",
"en": "Should registration be open to users who do not have a YunoHost account on the system?",
"fr": "L'inscription doit-elle être ouverte aux utilisateurs qui n'ont pas de compte YunoHost sur le système ?"
},
"default": false
@ -70,7 +70,7 @@
"name": "cache",
"type": "boolean",
"ask": {
"en": "Enable media-cache for your instance : downloaded media won't be downloaded twice, at the price of storage capacity.",
"en": "Enable media-cache for your instance: downloaded media won't be downloaded twice, at the price of storage capacity.",
"fr": "Activer le cache média pour votre instance : les médias téléchargés le seront pas deux fois, au prix d'un plus grande utilisation de l'espace de stockage."
},
"default": true

View file

@ -232,6 +232,10 @@ ynh_store_file_checksum --file="$config"
chmod 400 "$config"
chown $app:$app "$config"
ynh_script_progression --message="Configure admin UI to allow it to change setting - step 1/2" --weight=1
# change config file to allow configuration from the admin UI
ynh_replace_string --match_string="configurable_from_database: false" --replace_string="configurable_from_database: true" --target_file="$config"
#=================================================
# GENERIC FINALIZATION
#=================================================
@ -278,6 +282,7 @@ ynh_systemd_action --service_name=nginx --action=reload
# POST INSTALL
#=================================================
ynh_script_progression --message="Configure admin UI to allow it to change setting - step 2/2" --weight=1
# Correct path to 'static dir' in DB
# This must be done when Akkoma is running (i.e. after install and start)
ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl config migrate_to_db"
@ -295,6 +300,14 @@ ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_
ynh_script_progression --message="Installing Admin FrontEnd..." --weight=1
ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl frontend install admin-fe --ref stable"
#=================================================
# INSTALL MANGANE FRONTEND
#=================================================
# Mangane alternative Front-End will be built in, ready to enable
ynh_script_progression --message="Installing Mangane FrontEnd..." --weight=1
ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl frontend install mangane --ref dist --build-url https://github.com/BDX-town/Mangane/releases/latest/download/static.zip"
# Not activated, users need to change the "primary" frontend in the admin UI (use 'mangane' and 'dist').
#=================================================
# END OF SCRIPT
#=================================================