mirror of
https://github.com/YunoHost-Apps/pleroma_ynh.git
synced 2024-09-03 20:15:59 +02:00
Apply example_ynh
This commit is contained in:
parent
787b39587d
commit
7daa14c7b5
5 changed files with 80 additions and 84 deletions
|
@ -1,4 +1,5 @@
|
|||
location / {
|
||||
location / {
|
||||
|
||||
# if you do not want remote frontends to be able to access your Pleroma backend
|
||||
# server, remove these lines.
|
||||
if ($scheme = http) {
|
||||
|
@ -14,7 +15,7 @@
|
|||
|
||||
proxy_pass http://localhost:__PORT__;
|
||||
|
||||
client_max_body_size 16m;
|
||||
client_max_body_size 50M;
|
||||
|
||||
more_set_headers "Access-Control-Allow-Origin : *";
|
||||
more_set_headers "Access-Control-Allow-Methods : POST, PUT, DELETE, GET, PATCH, OPTIONS";
|
||||
|
@ -39,4 +40,4 @@
|
|||
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,18 +57,20 @@ fi
|
|||
|
||||
#=================================================
|
||||
# SPECIFIC BACKUP
|
||||
#=================================================
|
||||
# BACKUP CONFIG FILE
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="/etc/$app/config.exs"
|
||||
|
||||
#=================================================
|
||||
# BACKUP SYSTEMD
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="/etc/systemd/system/$app.service"
|
||||
|
||||
#=================================================
|
||||
# BACKUP VARIOUS FILES
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="/etc/$app/config.exs"
|
||||
|
||||
ynh_backup --src_path="$datadir" --is_big
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE POSTGRESQL DATABASE
|
||||
#=================================================
|
||||
|
@ -76,13 +78,6 @@ ynh_print_info --message="Backing up the PostgreSQL database..."
|
|||
|
||||
ynh_psql_dump_db --database="$db_name" > db.sql
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE DATA DIRECTORY
|
||||
#=================================================
|
||||
ynh_print_info --message="Backing up data directory..."
|
||||
|
||||
ynh_backup --src_path="$datadir" --is_big
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
|
@ -23,7 +23,6 @@ ynh_abort_if_errors
|
|||
#=================================================
|
||||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Retrieving arguments from the manifest..."
|
||||
|
||||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path_url="/"
|
||||
|
@ -131,6 +130,7 @@ then
|
|||
ynh_replace_string --match_string="{APP}" --replace_string="$app" --target_file="/etc/nginx/conf.d/$app-cache.conf"
|
||||
ynh_replace_string --match_string="__SIZE__" --replace_string="$size" --target_file="/etc/nginx/conf.d/$app-cache.conf"
|
||||
ynh_store_file_checksum --file="/etc/nginx/conf.d/$app-cache.conf"
|
||||
|
||||
ynh_replace_string --match_string="{APP}" --replace_string="$app" --target_file="../conf/media.conf"
|
||||
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/media.conf"
|
||||
cat ../conf/media.conf >> /etc/nginx/conf.d/$domain.d/$app.conf
|
||||
|
|
Loading…
Add table
Reference in a new issue