1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pleroma_ynh.git synced 2024-09-03 20:15:59 +02:00

Merge pull request #25 from YunoHost-Apps/testing

Cleaning
This commit is contained in:
yalh76 2019-02-06 02:38:07 +01:00 committed by GitHub
commit 5188e660bf
7 changed files with 20 additions and 36 deletions

View file

@ -46,12 +46,6 @@ For user friendly details about Pleroma: [see here](https://blog.soykaf.com/post
* [List of instances](http://distsn.org/pleroma-instances.html)
## Configuration
How to configure this app: by an admin panel, a plain file with SSH, or any other way.
## Admin Tasks
Go to **cd /var/www/pleroma/pleroma**.
@ -82,34 +76,24 @@ You can make users **moderators**. They will then be able to **delete any post**
## Documentation
* Official documentation: Link to the official documentation of this app
* YunoHost documentation: If specific documentation is needed, feel free to contribute.
* Official documentation: https://git.pleroma.social/pleroma/pleroma/wikis/home
## YunoHost specific features
#### Multi-users support
Are LDAP and HTTP auth supported?
Can the app be used by multiple users?
LDAP and HTTP auth are not supported?
The app can be used by multiple users?
#### Supported architectures
* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/pleroma%20%28Community%29.svg)](https://ci-apps.yunohost.org/ci/apps/pleroma/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/pleroma%20%28Community%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/pleroma/)
* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/pleroma%20%28Community%29.svg)](https://ci-stretch.nohost.me/ci/apps/pleroma/)
* Testing x86-64b - [![Build Status](https://ci-apps-unstable.yunohost.org/ci/logs/pleroma%20%28Community%29%20%28testing%29.svg)](https://ci-apps-unstable.yunohost.org/ci/apps/pleroma/)
* Unstable x86-64b - [![Build Status](https://ci-apps-unstable.yunohost.org/ci/logs/pleroma%20%28Community%29%20%28unstable%29.svg)](https://ci-apps-unstable.yunohost.org/ci/apps/pleroma/)
## Limitations
* Any known limitations.
## Additional information
* Other information you would add about this application
**More information on the documentation page:**
https://yunohost.org/packaging_apps
* No known limitations.
## Links

View file

@ -6,7 +6,7 @@
"en": "Pleroma is an OStatus-compatible social networking server written in Elixir, compatible with GNU Social and Mastodon",
"fr": "Pleroma est un réseau social écrit en Elixir, compatible avec OStatus, GNU Social et Mastodon"
},
"version": "0.9.0~ynh2",
"version": "0.9.0~ynh3",
"url": "https://git.pleroma.social/pleroma/pleroma",
"license": "AGPL-3.0-only",
"maintainer": {

View file

@ -29,7 +29,7 @@ app=$YNH_APP_INSTANCE_NAME
final_path=$(ynh_app_setting_get $app final_path)
domain=$(ynh_app_setting_get $app domain)
db_name=$(ynh_app_setting_get "$app" db_name)
db_name=$(ynh_app_setting_get $app db_name)
cache=$(ynh_app_setting_get "$app" cache)
#=================================================

View file

@ -44,7 +44,6 @@ then
admin="test"
fi
### 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", ...)
@ -128,7 +127,7 @@ sudo apt-key add erlang_solutions.asc
sudo rm erlang_solutions.asc
# install dependencies
ynh_install_app_dependencies git build-essential postgresql postgresql-contrib openssl g++ apt-transport-https erlang-inets elixir erlang-dev erlang-parsetools erlang-xmerl erlang-tools
ynh_install_app_dependencies git build-essential openssl ssh sudo postgresql postgresql-contrib elixir erlang-dev erlang-parsetools erlang-xmerl erlang-tools
#=================================================
# CREATE A POSTGRESQL DATABASE
@ -141,9 +140,9 @@ ynh_install_app_dependencies git build-essential postgresql postgresql-contrib o
### - Remove also the section "REMOVE THE POSTGRESQL DATABASE" in the remove script
### - As well as the section "RESTORE THE POSTGRESQL DATABASE" in the restore script
db_name="$app"
db_name=$(ynh_sanitize_dbid $app)
db_pwd=$(ynh_string_random 30)
ynh_app_setting_set "$app" db_name "$db_name"
ynh_app_setting_set $app db_name $db_name
ynh_app_setting_set "$app" db_pwd "$db_pwd"
ynh_psql_test_if_first_run
ynh_psql_create_user "$app" "$db_pwd"
@ -219,6 +218,7 @@ ynh_system_user_create "$app" "$final_path"
#=================================================
# MODIFY A CONFIG FILE
#=================================================
cp -f ../conf/generated_config.exs "$final_path/$app/config/prod.secret.exs"
ynh_replace_string "__DOMAIN__" "$domain" "$final_path/$app/config/prod.secret.exs"
@ -253,6 +253,7 @@ cp -f ../conf/prod.exs "$final_path/$app/config/prod.exs"
#=================================================
# MAKE SETUP
#=================================================
# Give permission to the final_path
chown -R "$app":"$app" "$final_path"
@ -271,7 +272,6 @@ pushd $final_path/$app
ynh_replace_string "administrator@example.com" "__ADMIN_EMAIL__" "$final_path/$app/config/prod.secret.exs"
popd
#=================================================
# SETUP SYSTEMD
#=================================================

View file

@ -18,7 +18,7 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
port=$(ynh_app_setting_get $app port)
db_name=$(ynh_app_setting_get "$app" db_name)
db_name=$(ynh_app_setting_get $app db_name)
final_path=$(ynh_app_setting_get $app final_path)
cache=$(ynh_app_setting_get "$app" cache)

View file

@ -30,10 +30,10 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
path_url="/"
final_path=$(ynh_app_setting_get $app final_path)
port=$(ynh_app_setting_get "$app" port)
db_name=$(ynh_app_setting_get "$app" db_name)
db_pwd=$(ynh_app_setting_get "$app" db_pwd)
cache=$(ynh_app_setting_get "$app" cache)
port=$(ynh_app_setting_get $app port)
db_name=$(ynh_app_setting_get $app db_name)
db_pwd=$(ynh_app_setting_get $app db_pwd)
cache=$(ynh_app_setting_get $app cache)
#=================================================
@ -117,7 +117,7 @@ sudo apt-key add erlang_solutions.asc
sudo rm erlang_solutions.asc
# install dependencies
ynh_install_app_dependencies git build-essential postgresql postgresql-contrib openssl g++ apt-transport-https erlang-inets elixir erlang-dev erlang-parsetools erlang-xmerl erlang-tools
ynh_install_app_dependencies git build-essential openssl ssh sudo postgresql postgresql-contrib elixir erlang-dev erlang-parsetools erlang-xmerl erlang-tools
#=================================================
# RESTORE SYSTEMD

View file

@ -142,8 +142,7 @@ sudo apt-key add erlang_solutions.asc
sudo rm erlang_solutions.asc
# install dependencies
ynh_install_app_dependencies git build-essential postgresql postgresql-contrib openssl g++ apt-transport-https erlang-inets elixir erlang-dev erlang-parsetools erlang-xmerl erlang-tools
ynh_install_app_dependencies git build-essential openssl ssh sudo postgresql postgresql-contrib elixir erlang-dev erlang-parsetools erlang-xmerl erlang-tools
#=================================================
# CREATE DEDICATED USER
@ -164,6 +163,7 @@ ynh_system_user_create "$app" "$final_path"
#=================================================
# MODIFY A CONFIG FILE
#=================================================
cp -f ../conf/generated_config.exs "$final_path/$app/config/prod.secret.exs"
ynh_replace_string "__DOMAIN__" "$domain" "$final_path/$app/config/prod.secret.exs"
@ -212,7 +212,7 @@ cp -f ../conf/prod.exs "$final_path/$app/config/prod.exs"
# Give permission to the final_path
chown -R "$app":"$app" "$final_path"
pushd $final_path/$app
sudo -u "$app" mix deps.get
sudo -u "$app" MIX_ENV=prod mix deps.get
sudo -u "$app" MIX_ENV=prod mix ecto.migrate --force
popd