mirror of
https://github.com/YunoHost-Apps/mastodon_ynh.git
synced 2024-09-03 19:46:02 +02:00
commit
fa8a9d4eed
16 changed files with 177 additions and 118 deletions
44
README.md
44
README.md
|
@ -1,3 +1,8 @@
|
||||||
|
<!--
|
||||||
|
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
|
||||||
|
It shall NOT be edited by hand.
|
||||||
|
-->
|
||||||
|
|
||||||
# Mastodon for YunoHost
|
# Mastodon for YunoHost
|
||||||
|
|
||||||
[![Integration level](https://dash.yunohost.org/integration/mastodon.svg)](https://dash.yunohost.org/appci/app/mastodon) ![](https://ci-apps.yunohost.org/ci/badges/mastodon.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mastodon.maintain.svg)
|
[![Integration level](https://dash.yunohost.org/integration/mastodon.svg)](https://dash.yunohost.org/appci/app/mastodon) ![](https://ci-apps.yunohost.org/ci/badges/mastodon.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mastodon.maintain.svg)
|
||||||
|
@ -9,9 +14,18 @@
|
||||||
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
|
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
Mastodon is a free, open-source microblogging social network. It is a decentralized alternative to commercial platforms like Twitter and avoids the risks of a single company monopolizing your communication for commercial purposes.
|
Mastodon is a free, open-source microblogging social network. It is a decentralized alternative to commercial platforms like Twitter and avoids the risks of a single company monopolizing your communication for commercial purposes.
|
||||||
|
|
||||||
**Shipped version:** 3.4.1
|
**Shipped version:** 3.4.4~ynh1
|
||||||
|
|
||||||
|
**Demo:** https://joinmastodon.org/
|
||||||
|
|
||||||
|
## Screenshots
|
||||||
|
|
||||||
|
![](./doc/screenshots/mastodon.png)
|
||||||
|
|
||||||
|
## Disclaimers / important information
|
||||||
|
|
||||||
## Important points to read before installing
|
## Important points to read before installing
|
||||||
|
|
||||||
|
@ -20,10 +34,6 @@ Mastodon is a free, open-source microblogging social network. It is a decentrali
|
||||||
1. At the end of the installation a mail is sent to the user with the automatically generated password
|
1. At the end of the installation a mail is sent to the user with the automatically generated password
|
||||||
1. It seems important to close the inscriptions for your Mastodon, so that it remains a private body. We invite you to block remote malicious instances from the administration interface. You can also add text on your home page.
|
1. It seems important to close the inscriptions for your Mastodon, so that it remains a private body. We invite you to block remote malicious instances from the administration interface. You can also add text on your home page.
|
||||||
|
|
||||||
## Screenshots
|
|
||||||
|
|
||||||
![](https://framalibre.org/sites/default/files/mastodon.png)
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
### Install
|
### Install
|
||||||
|
@ -50,29 +60,19 @@ $ screen -r
|
||||||
|
|
||||||
`$ (cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl --help)`
|
`$ (cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl --help)`
|
||||||
|
|
||||||
## Documentation
|
|
||||||
|
|
||||||
* Official documentation: https://docs.joinmastodon.org/
|
|
||||||
|
|
||||||
## YunoHost specific features
|
## YunoHost specific features
|
||||||
|
|
||||||
#### Multi-users support
|
#### Multi-users support
|
||||||
|
|
||||||
LDAP authentication is activated. All YunoHost users can authenticate.
|
LDAP authentication is activated. All YunoHost users can authenticate.
|
||||||
|
|
||||||
#### Supported architectures
|
## Documentation and resources
|
||||||
|
|
||||||
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mastodon.svg)](https://ci-apps.yunohost.org/ci/apps/mastodon/)
|
* Official app website: https://joinmastodon.org/
|
||||||
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mastodon.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mastodon/)
|
* Official admin documentation: https://docs.joinmastodon.org/
|
||||||
|
* Upstream app code repository: https://github.com/mastodon/mastodon
|
||||||
## Links
|
* YunoHost documentation for this app: https://yunohost.org/app_mastodon
|
||||||
|
* Report a bug: https://github.com/YunoHost-Apps/mastodon_ynh/issues
|
||||||
* Report a bug: https://github.com/YunoHost-Apps/mastodon_ynh/issues
|
|
||||||
* App website: https://joinmastodon.org/
|
|
||||||
* Upstream app repository: https://github.com/tootsuite/mastodon
|
|
||||||
* YunoHost website: https://yunohost.org/
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Developer info
|
## Developer info
|
||||||
|
|
||||||
|
@ -84,3 +84,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/mastodon_ynh/tree/tes
|
||||||
or
|
or
|
||||||
sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh/tree/testing --debug
|
sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh/tree/testing --debug
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**More info regarding app packaging:** https://yunohost.org/packaging_apps
|
35
README_fr.md
35
README_fr.md
|
@ -4,14 +4,25 @@
|
||||||
[![Installer Mastodon avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mastodon)
|
[![Installer Mastodon avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mastodon)
|
||||||
|
|
||||||
*[Read this readme in english.](./README.md)*
|
*[Read this readme in english.](./README.md)*
|
||||||
|
*[Lire ce readme en français.](./README_fr.md)*
|
||||||
|
|
||||||
> *Ce package vous permet d'installer Mastodon rapidement et simplement sur un serveur YunoHost.
|
> *Ce package vous permet d'installer Mastodon rapidement et simplement sur un serveur YunoHost.
|
||||||
Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.*
|
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
||||||
|
|
||||||
## Vue d'ensemble
|
## Vue d'ensemble
|
||||||
|
|
||||||
Mastodon est un réseau social de microblog auto-hébergé et open source. C'est une alternative décentralisée aux plates-formes commerciales comme Twitter. Mastodon évite ainsi les risques qu'une seule société monopolise votre communication à des fins commerciales.
|
Mastodon est un réseau social de microblog auto-hébergé et open source. C'est une alternative décentralisée aux plates-formes commerciales comme Twitter. Mastodon évite ainsi les risques qu'une seule société monopolise votre communication à des fins commerciales.
|
||||||
|
|
||||||
**Version incluse:** 3.4.1
|
|
||||||
|
**Version incluse :** 3.4.4~ynh1
|
||||||
|
|
||||||
|
**Démo :** https://joinmastodon.org/
|
||||||
|
|
||||||
|
## Captures d'écran
|
||||||
|
|
||||||
|
![](./doc/screenshots/mastodon.png)
|
||||||
|
|
||||||
|
## Avertissements / informations importantes
|
||||||
|
|
||||||
## Points importants à lire avant l'installation
|
## Points importants à lire avant l'installation
|
||||||
|
|
||||||
|
@ -61,19 +72,13 @@ L'utilisateur admin est créé automatiquement comme : user@domain.tld
|
||||||
|
|
||||||
L'authentification LDAP est activée. Tous les utilisateurs YunoHost peuvent s'authentifier.
|
L'authentification LDAP est activée. Tous les utilisateurs YunoHost peuvent s'authentifier.
|
||||||
|
|
||||||
#### Architectures supportées
|
## Documentations et ressources
|
||||||
|
|
||||||
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mastodon.svg)](https://ci-apps.yunohost.org/ci/apps/mastodon/)
|
* Site officiel de l'app : https://joinmastodon.org/
|
||||||
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mastodon.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mastodon/)
|
* Documentation officielle de l'admin : https://docs.joinmastodon.org/
|
||||||
|
* Dépôt de code officiel de l'app : https://github.com/mastodon/mastodon
|
||||||
## Liens
|
* Documentation YunoHost pour cette app : https://yunohost.org/app_mastodon
|
||||||
|
* Signaler un bug : https://github.com/YunoHost-Apps/mastodon_ynh/issues
|
||||||
* Signaler un bug : https://github.com/YunoHost-Apps/mastodon_ynh/issues
|
|
||||||
* Site de l'application : https://joinmastodon.org/
|
|
||||||
* Dépôt de l'application principale : https://github.com/tootsuite/mastodon
|
|
||||||
* Site web YunoHost : https://yunohost.org/
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Informations pour les développeurs
|
## Informations pour les développeurs
|
||||||
|
|
||||||
|
@ -85,3 +90,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/mastodon_ynh/tree/tes
|
||||||
ou
|
ou
|
||||||
sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh/tree/testing --debug
|
sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh/tree/testing --debug
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps
|
|
@ -1,9 +1,9 @@
|
||||||
;; Test complet
|
;; Test complet
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld"
|
||||||
admin="john" (USER)
|
admin="john"
|
||||||
language="fr_FR"
|
language="fr_FR"
|
||||||
is_public=1 (PUBLIC|public=1|private=0)
|
is_public=1
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
setup_sub_dir=0
|
setup_sub_dir=0
|
||||||
|
@ -12,47 +12,14 @@
|
||||||
setup_private=1
|
setup_private=1
|
||||||
setup_public=1
|
setup_public=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
# 3.1.2~ynh2
|
|
||||||
#upgrade=1 from_commit=7e1f4c2dee5f2c8374686aea62f4648cdf2722c3
|
|
||||||
# 3.1.2~ynh3
|
|
||||||
#upgrade=1 from_commit=6b30109fc986d83166b1805ec3ad7e28200e3743
|
|
||||||
# 3.1.2~ynh4
|
|
||||||
#upgrade=1 from_commit=d3df899e0a99a63ee1cf7ad845cc513aeaaf30ef
|
|
||||||
# 3.2.0~ynh1
|
|
||||||
#upgrade=1 from_commit=bde14cc4496445fdfed4616ac44fc9527c8369fd
|
|
||||||
# 3.2.1~ynh1
|
|
||||||
#upgrade=1 from_commit=248b717f373f3c82bdb19c33cf20980494608697
|
|
||||||
# 3.2.1~ynh2
|
|
||||||
#upgrade=1 from_commit=74908bf3e70c134bc838c7db3ae8b5aa0938cd75
|
|
||||||
# 3.2.2~ynh1
|
|
||||||
#upgrade=1 from_commit=a233ccc644d97aa89756fac9f0ce68c98d81d27c
|
|
||||||
# 3.3.0~ynh1
|
|
||||||
#upgrade=1 from_commit=a7eb98db3fac0697b923072dcd78c1ca04bf0a12
|
|
||||||
# 3.4.1~ynh1
|
# 3.4.1~ynh1
|
||||||
#upgrade=1 from_commit=efbdbb05350b820c6e59a7bbbf70f57cf679fff8
|
upgrade=1 from_commit=efbdbb05350b820c6e59a7bbbf70f57cf679fff8
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=0
|
||||||
port_already_use=0
|
|
||||||
change_url=0
|
change_url=0
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=yalh@yahoo.com
|
Email=yalh@yahoo.com
|
||||||
Notification=all
|
Notification=all
|
||||||
;;; Upgrade options
|
;;; Upgrade options
|
||||||
; commit=7e1f4c2dee5f2c8374686aea62f4648cdf2722c3
|
|
||||||
name=3.1.2~ynh2
|
|
||||||
; commit=6b30109fc986d83166b1805ec3ad7e28200e3743
|
|
||||||
name=3.1.2~ynh3
|
|
||||||
; commit=d3df899e0a99a63ee1cf7ad845cc513aeaaf30ef
|
|
||||||
name=3.1.2~ynh4
|
|
||||||
; commit=bde14cc4496445fdfed4616ac44fc9527c8369fd
|
|
||||||
name=3.2.0~ynh1
|
|
||||||
; commit=248b717f373f3c82bdb19c33cf20980494608697
|
|
||||||
name=3.2.1~ynh1
|
|
||||||
; commit=74908bf3e70c134bc838c7db3ae8b5aa0938cd75
|
|
||||||
name=3.2.1~ynh2
|
|
||||||
; commit=a233ccc644d97aa89756fac9f0ce68c98d81d27c
|
|
||||||
name=3.2.2~ynh1
|
|
||||||
; commit=a7eb98db3fac0697b923072dcd78c1ca04bf0a12
|
|
||||||
name=3.3.0~ynh1
|
|
||||||
; commit=efbdbb05350b820c6e59a7bbbf70f57cf679fff8
|
; commit=efbdbb05350b820c6e59a7bbbf70f57cf679fff8
|
||||||
name=3.4.1~ynh1
|
name=3.4.1~ynh1
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
SOURCE_URL=https://github.com/tootsuite/mastodon/archive/refs/tags/v3.4.1.tar.gz
|
SOURCE_URL=https://github.com/tootsuite/mastodon/archive/refs/tags/v3.4.4.tar.gz
|
||||||
SOURCE_SUM=9e449805ea78afa62fee8ab31a427dee57b50cdb391335d4986d10e611103fbd
|
SOURCE_SUM=567e57cc9d35306cbd708a33bc0bf1adf7981f3706ca4eced0d0c2b4f980034d
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
SOURCE_FILENAME=
|
|
||||||
SOURCE_EXTRACT=true
|
SOURCE_EXTRACT=true
|
||||||
|
|
10
conf/cron
10
conf/cron
|
@ -1,5 +1,5 @@
|
||||||
@daily cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl media remove
|
@daily cd __FINAL_PATH__/live && sudo -u __APP__ __YNH_RUBY_LOAD_PATH__ RAILS_ENV=production bin/tootctl media remove
|
||||||
@monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl media remove-orphans
|
@monthly cd __FINAL_PATH__/live && sudo -u __APP__ __YNH_RUBY_LOAD_PATH__ RAILS_ENV=production bin/tootctl media remove-orphans
|
||||||
@monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl accounts cull
|
@monthly cd __FINAL_PATH__/live && sudo -u __APP__ __YNH_RUBY_LOAD_PATH__ RAILS_ENV=production bin/tootctl accounts cull
|
||||||
@monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl statuses remove
|
@monthly cd __FINAL_PATH__/live && sudo -u __APP__ __YNH_RUBY_LOAD_PATH__ RAILS_ENV=production bin/tootctl statuses remove
|
||||||
@monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl preview_cards remove
|
@monthly cd __FINAL_PATH__/live && sudo -u __APP__ __YNH_RUBY_LOAD_PATH__ RAILS_ENV=production bin/tootctl preview_cards remove
|
||||||
|
|
|
@ -6,11 +6,6 @@ root __FINALPATH__/live/public;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
|
||||||
# Force usage of https
|
|
||||||
if ($scheme = http) {
|
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
|
||||||
}
|
|
||||||
|
|
||||||
proxy_set_header Accept-Encoding "";
|
proxy_set_header Accept-Encoding "";
|
||||||
try_files $uri @proxy;
|
try_files $uri @proxy;
|
||||||
|
|
||||||
|
|
1
doc/DESCRIPTION.md
Normal file
1
doc/DESCRIPTION.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Mastodon is a free, open-source microblogging social network. It is a decentralized alternative to commercial platforms like Twitter and avoids the risks of a single company monopolizing your communication for commercial purposes.
|
1
doc/DESCRIPTION_fr.md
Normal file
1
doc/DESCRIPTION_fr.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Mastodon est un réseau social de microblog auto-hébergé et open source. C'est une alternative décentralisée aux plates-formes commerciales comme Twitter. Mastodon évite ainsi les risques qu'une seule société monopolise votre communication à des fins commerciales.
|
38
doc/DISCLAIMER.md
Normal file
38
doc/DISCLAIMER.md
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
## Important points to read before installing
|
||||||
|
|
||||||
|
1. **Mastodon** require a dedicated **root domain**, eg. mastodon.domain.tld
|
||||||
|
1. The user choosen during the installation is automatically created in Mastodon with admin rights
|
||||||
|
1. At the end of the installation a mail is sent to the user with the automatically generated password
|
||||||
|
1. It seems important to close the inscriptions for your Mastodon, so that it remains a private body. We invite you to block remote malicious instances from the administration interface. You can also add text on your home page.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
### Install
|
||||||
|
|
||||||
|
#### Using *screen* in case of disconnect
|
||||||
|
```
|
||||||
|
$ sudo apt-get install screen
|
||||||
|
$ screen
|
||||||
|
$ sudo yunohost app install https://github.com/YunoHost-Apps/mastodon_ynh.git
|
||||||
|
```
|
||||||
|
Recover after disconnect:
|
||||||
|
```
|
||||||
|
$ screen -d
|
||||||
|
$ screen -r
|
||||||
|
```
|
||||||
|
|
||||||
|
### Update
|
||||||
|
|
||||||
|
#### Using *screen* highly recommended
|
||||||
|
|
||||||
|
`$ sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh --debug `
|
||||||
|
|
||||||
|
### Administrate with tooctl
|
||||||
|
|
||||||
|
`$ (cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl --help)`
|
||||||
|
|
||||||
|
## YunoHost specific features
|
||||||
|
|
||||||
|
#### Multi-users support
|
||||||
|
|
||||||
|
LDAP authentication is activated. All YunoHost users can authenticate.
|
47
doc/DISCLAIMER_fr.md
Normal file
47
doc/DISCLAIMER_fr.md
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
## Points importants à lire avant l'installation
|
||||||
|
|
||||||
|
1. **Mastodon** nécessite un **nom de domaine** dédié, par exemple : mastodon.domain.tld
|
||||||
|
1. L'utilisateur sélectionné pendant l'installation sera créé automatiquement dans Mastodon avec des droits d'administration.
|
||||||
|
1. À la fin de l'installation, un mail est envoyé à cet utilisateur avec un mot de passe généré automatiquement.
|
||||||
|
1. Pour que votre instance Mastodon reste privée, il est important de fermer les inscriptions. Nous vous invitons à bloquer les instances distantes indésirables depuis l'interface d'administration. Vous pouvez également ajouter un texte sur votre page d'accueil dans l'administration.
|
||||||
|
|
||||||
|
## Captures d'écran
|
||||||
|
|
||||||
|
![](https://framalibre.org/sites/default/files/mastodon.png)
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
#### Utilisation de *screen* en cas de déconnection
|
||||||
|
```
|
||||||
|
$ sudo apt-get install screen
|
||||||
|
$ screen
|
||||||
|
$ sudo yunohost app install https://github.com/YunoHost-Apps/mastodon_ynh.git
|
||||||
|
```
|
||||||
|
Récupérer l'installation après une deconnection :
|
||||||
|
```
|
||||||
|
$ screen -d
|
||||||
|
$ screen -r
|
||||||
|
```
|
||||||
|
L'utilisateur admin est créé automatiquement comme : user@domain.tld
|
||||||
|
|
||||||
|
### Mise à jour
|
||||||
|
|
||||||
|
#### Utilisation de *screen* fortement recommandée
|
||||||
|
|
||||||
|
`$ sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh --debug `
|
||||||
|
|
||||||
|
### Administration avec tooctl
|
||||||
|
|
||||||
|
`$ (cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl --help)`
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
* Documentation officielle : https://docs.joinmastodon.org/
|
||||||
|
|
||||||
|
## Caractéristiques spécifiques YunoHost
|
||||||
|
|
||||||
|
#### Support multi-utilisateur
|
||||||
|
|
||||||
|
L'authentification LDAP est activée. Tous les utilisateurs YunoHost peuvent s'authentifier.
|
BIN
doc/screenshots/mastodon.png
Normal file
BIN
doc/screenshots/mastodon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 244 KiB |
|
@ -3,11 +3,18 @@
|
||||||
"id": "mastodon",
|
"id": "mastodon",
|
||||||
"packaging_format": 1,
|
"packaging_format": 1,
|
||||||
"description": {
|
"description": {
|
||||||
"en": "A libre and federated social network.",
|
"en": "Libre and federated social network",
|
||||||
"fr": "Un réseau social libre et fédéré."
|
"fr": "Réseau social libre et fédéré"
|
||||||
|
},
|
||||||
|
"version": "3.4.4~ynh1",
|
||||||
|
"url": "https://github.com/mastodon/mastodon",
|
||||||
|
"upstream": {
|
||||||
|
"license": "AGPL-3.0-or-later",
|
||||||
|
"website": "https://joinmastodon.org/",
|
||||||
|
"demo": "https://joinmastodon.org/",
|
||||||
|
"admindoc": "https://docs.joinmastodon.org/",
|
||||||
|
"code": "https://github.com/mastodon/mastodon"
|
||||||
},
|
},
|
||||||
"version": "3.4.1~ynh4",
|
|
||||||
"url": "https://github.com/tootsuite/mastodon",
|
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
"name": "yalh76"
|
"name": "yalh76"
|
||||||
|
@ -23,7 +30,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.2.0"
|
"yunohost": ">= 4.3.0"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
|
@ -33,13 +40,11 @@
|
||||||
"install" : [
|
"install" : [
|
||||||
{
|
{
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
"type": "domain",
|
"type": "domain"
|
||||||
"example": "example.com"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "admin",
|
"name": "admin",
|
||||||
"type": "user",
|
"type": "user"
|
||||||
"example": "johndoe"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "is_public",
|
"name": "is_public",
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# dependencies used by the app
|
# dependencies used by the app
|
||||||
pkg_dependencies="imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git-core g++ libprotobuf-dev protobuf-compiler pkg-config gcc autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3|libgdbm6 libgdbm-dev redis-server redis-tools postgresql postgresql-contrib libidn11-dev libicu-dev libjemalloc-dev curl apt-transport-https"
|
pkg_dependencies="imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git-core g++ libprotobuf-dev protobuf-compiler pkg-config gcc autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3|libgdbm6 libgdbm-dev redis-tools redis-server postgresql postgresql-contrib libidn11-dev libicu-dev libjemalloc-dev curl apt-transport-https"
|
||||||
|
|
||||||
MEMORY_NEEDED="2560"
|
MEMORY_NEEDED="2560"
|
||||||
|
|
||||||
|
|
|
@ -75,8 +75,8 @@ ynh_app_setting_set --app=$app --key=port_stream --value=$port_stream
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Installing dependencies..."
|
ynh_script_progression --message="Installing dependencies..."
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||||
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
|
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
|
||||||
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
|
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
|
||||||
ynh_install_ruby --ruby_version=$RUBY_VERSION
|
ynh_install_ruby --ruby_version=$RUBY_VERSION
|
||||||
|
|
||||||
|
@ -93,13 +93,13 @@ ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Creating a PostgreSQL database..."
|
ynh_script_progression --message="Creating a PostgreSQL database..."
|
||||||
|
|
||||||
|
ynh_psql_test_if_first_run
|
||||||
# Create PostgreSQL database
|
# Create PostgreSQL database
|
||||||
db_name=$(ynh_sanitize_dbid --db_name="${app}_production")
|
db_name=$(ynh_sanitize_dbid --db_name="${app}_production")
|
||||||
db_user=$(ynh_sanitize_dbid --db_name=$app)
|
db_user=$(ynh_sanitize_dbid --db_name=$app)
|
||||||
db_pwd=$(ynh_string_random --length=30)
|
db_pwd=$(ynh_string_random --length=30)
|
||||||
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
||||||
ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd
|
ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd
|
||||||
ynh_psql_test_if_first_run
|
|
||||||
ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||||
ynh_psql_execute_as_root --sql="ALTER USER $db_user CREATEDB;"
|
ynh_psql_execute_as_root --sql="ALTER USER $db_user CREATEDB;"
|
||||||
|
|
||||||
|
@ -207,13 +207,13 @@ pushd "$final_path/live"
|
||||||
sudo -u $app $ynh_ruby_load_path bin/bundle config without 'development test'
|
sudo -u $app $ynh_ruby_load_path bin/bundle config without 'development test'
|
||||||
sudo -u $app $ynh_ruby_load_path bin/bundle install -j$(getconf _NPROCESSORS_ONLN)
|
sudo -u $app $ynh_ruby_load_path bin/bundle install -j$(getconf _NPROCESSORS_ONLN)
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
sudo -u $app $ynh_node_load_PATH yarn install --pure-lockfile
|
ynh_exec_warn_less sudo -u $app $ynh_node_load_PATH yarn install --pure-lockfile
|
||||||
echo "SAFETY_ASSURED=1">> $config
|
echo "SAFETY_ASSURED=1">> $config
|
||||||
sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails db:setup --quiet
|
ynh_exec_warn_less sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails db:setup --quiet
|
||||||
sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails assets:precompile --quiet
|
ynh_exec_warn_less sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails assets:precompile --quiet
|
||||||
sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt
|
ynh_exec_warn_less sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt
|
||||||
sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=admin > /dev/null
|
ynh_exec_warn_less sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=admin > /dev/null
|
||||||
sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/tootctl accounts modify "$admin" --approve
|
ynh_exec_warn_less sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/tootctl accounts modify "$admin" --approve
|
||||||
popd
|
popd
|
||||||
|
|
||||||
vapid_private_key=$(grep -oP "VAPID_PRIVATE_KEY=\K.+" "$final_path/live/key.txt")
|
vapid_private_key=$(grep -oP "VAPID_PRIVATE_KEY=\K.+" "$final_path/live/key.txt")
|
||||||
|
|
|
@ -41,10 +41,7 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Validating restoration parameters..."
|
ynh_script_progression --message="Validating restoration parameters..."
|
||||||
|
|
||||||
ynh_webpath_available --domain=$domain --path_url=$path_url \
|
test ! -d $final_path || ynh_die --message="There is already a directory: $final_path "
|
||||||
|| ynh_die --message="Path not available: ${domain}${path_url}"
|
|
||||||
test ! -d $final_path \
|
|
||||||
|| ynh_die --message="There is already a directory: $final_path "
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD RESTORATION STEPS
|
# STANDARD RESTORATION STEPS
|
||||||
|
@ -104,8 +101,8 @@ ynh_restore_file --origin_path="/etc/cron.d/$app"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reinstalling dependencies..."
|
ynh_script_progression --message="Reinstalling dependencies..."
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||||
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
|
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
|
||||||
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
|
ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg"
|
||||||
ynh_install_ruby --ruby_version=$RUBY_VERSION
|
ynh_install_ruby --ruby_version=$RUBY_VERSION
|
||||||
|
|
||||||
|
|
|
@ -269,10 +269,10 @@ pushd "$final_path/live"
|
||||||
sudo -u $app $ynh_ruby_load_path bin/bundle install -j$(getconf _NPROCESSORS_ONLN)
|
sudo -u $app $ynh_ruby_load_path bin/bundle install -j$(getconf _NPROCESSORS_ONLN)
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
sudo -u $app $ynh_node_load_PATH yarn install --pure-lockfile
|
sudo -u $app $ynh_node_load_PATH yarn install --pure-lockfile
|
||||||
sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails assets:clean
|
ynh_exec_warn_less sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails assets:clean
|
||||||
sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails assets:precompile
|
ynh_exec_warn_less sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails assets:precompile
|
||||||
sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails db:migrate
|
ynh_exec_warn_less sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails db:migrate
|
||||||
sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/tootctl cache clear
|
ynh_exec_warn_less sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/tootctl cache clear
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue