mirror of
https://github.com/YunoHost-Apps/pleroma_ynh.git
synced 2024-09-03 20:15:59 +02:00
commit
cf6a55a3f8
7 changed files with 36 additions and 27 deletions
|
@ -8,7 +8,7 @@ use Mix.Config
|
|||
config :pleroma, Pleroma.Web.Endpoint,
|
||||
url: [host: "__DOMAIN__", scheme: "https", port: 443],
|
||||
secret_key_base: "__KEY__",
|
||||
http: [port: __PORT__]
|
||||
http: [ip: {127, 0, 0, 1}, port: __PORT__]
|
||||
|
||||
config :pleroma, :instance,
|
||||
name: "__INSTANCE_NAME__",
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
location /proxy {
|
||||
rewrite ^/proxy/(.*)/(.*)/.* /proxy/$1/$2 last;
|
||||
|
||||
location ~ ^/(media|proxy) {
|
||||
proxy_cache {APP}_media_cache;
|
||||
proxy_cache_key $host$uri$is_args$args;
|
||||
proxy_http_version 1.1;
|
||||
|
@ -9,5 +11,6 @@
|
|||
chunked_transfer_encoding on;
|
||||
proxy_ignore_headers Cache-Control;
|
||||
proxy_hide_header Cache-Control;
|
||||
|
||||
proxy_pass http://localhost:__PORT__;
|
||||
}
|
||||
|
|
|
@ -4,6 +4,17 @@
|
|||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
# Standard nginx configuration
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
|
||||
proxy_pass http://localhost:__PORT__;
|
||||
|
||||
client_max_body_size 16m;
|
||||
|
||||
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||
add_header 'Access-Control-Allow-Methods' 'POST, PUT, DELETE, GET, PATCH, OPTIONS' always;
|
||||
add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type, Idempotency-Key' always;
|
||||
|
@ -24,14 +35,6 @@
|
|||
# Uncomment this only after you get HTTPS working.
|
||||
# add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
|
||||
proxy_pass http://localhost:__PORT__;
|
||||
|
||||
client_max_body_size 16m;
|
||||
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
|
|
|
@ -107,18 +107,19 @@ port=$(ynh_find_port 8095)
|
|||
ynh_app_setting_set $app port $port
|
||||
|
||||
#=================================================
|
||||
# INSTALL ERLANG and ELIXIR
|
||||
# INSTALL ERLANG AND ELIXIR
|
||||
#=================================================
|
||||
ynh_print_info "Installing erlang and elixir ..."
|
||||
|
||||
if [ "$(lsb_release --codename --short)" == "jessie" ]; then
|
||||
sudo apt install -y ../conf/esl-erlang_21.2.6-1~debian~jessie_amd64.deb
|
||||
sudo apt install -y ../conf/elixir_1.8.1-2~debian~jessie_amd64.deb
|
||||
echo "deb http://packages.erlang-solutions.com/debian jessie contrib" | tee /etc/apt/sources.list.d/erlang-solutions.list
|
||||
elif
|
||||
[ "$(lsb_release --codename --short)" == "stretch" ]; then
|
||||
sudo apt install -y ../conf/esl-erlang_21.2.6-1~debian~stretch_amd64.deb
|
||||
sudo apt install -y ../conf/elixir_1.8.1-2~debian~stretch_amd64.deb
|
||||
echo "deb http://packages.erlang-solutions.com/debian stretch contrib" | tee /etc/apt/sources.list.d/erlang-solutions.list
|
||||
fi
|
||||
sudo wget https://packages.erlang-solutions.com/debian/erlang_solutions.asc
|
||||
sudo apt-key add erlang_solutions.asc
|
||||
sudo rm erlang_solutions.asc
|
||||
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
|
|
|
@ -74,8 +74,8 @@ ynh_remove_app_dependencies
|
|||
#=================================================
|
||||
ynh_print_info "Removing erlang and elixir..."
|
||||
|
||||
sudo apt remove -y esl-erlang
|
||||
sudo apt remove -y elixir
|
||||
ynh_secure_remove "/etc/apt/sources.list.d/erlang-solutions.list"
|
||||
apt-key del A14F4FCA
|
||||
|
||||
#=================================================
|
||||
# REMOVE APP MAIN DIR
|
||||
|
|
|
@ -90,18 +90,19 @@ chown -R "$app":"$app" "$final_path"
|
|||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
#=================================================
|
||||
# INSTALL ERLANG and ELIXIR
|
||||
# INSTALL ERLANG AND ELIXIR
|
||||
#=================================================
|
||||
ynh_print_info "Installing erlang and elixir ..."
|
||||
|
||||
if [ "$(lsb_release --codename --short)" == "jessie" ]; then
|
||||
sudo apt install -y ../settings/conf/esl-erlang_21.2.6-1~debian~jessie_amd64.deb
|
||||
sudo apt install -y ../settings/conf/elixir_1.8.1-2~debian~jessie_amd64.deb
|
||||
echo "deb http://packages.erlang-solutions.com/debian jessie contrib" | tee /etc/apt/sources.list.d/erlang-solutions.list
|
||||
elif
|
||||
[ "$(lsb_release --codename --short)" == "stretch" ]; then
|
||||
sudo apt install -y ../settings/conf/esl-erlang_21.2.6-1~debian~stretch_amd64.deb
|
||||
sudo apt install -y ../settings/conf/elixir_1.8.1-2~debian~stretch_amd64.deb
|
||||
echo "deb http://packages.erlang-solutions.com/debian stretch contrib" | tee /etc/apt/sources.list.d/erlang-solutions.list
|
||||
fi
|
||||
sudo wget https://packages.erlang-solutions.com/debian/erlang_solutions.asc
|
||||
sudo apt-key add erlang_solutions.asc
|
||||
sudo rm erlang_solutions.asc
|
||||
|
||||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
|
|
|
@ -140,18 +140,19 @@ then
|
|||
fi
|
||||
|
||||
#=================================================
|
||||
# INSTALL ERLANG and ELIXIR
|
||||
# INSTALL ERLANG AND ELIXIR
|
||||
#=================================================
|
||||
ynh_print_info "Installing erlang and elixir ..."
|
||||
|
||||
if [ "$(lsb_release --codename --short)" == "jessie" ]; then
|
||||
sudo apt install -y ../conf/esl-erlang_21.2.6-1~debian~jessie_amd64.deb
|
||||
sudo apt install -y ../conf/elixir_1.8.1-2~debian~jessie_amd64.deb
|
||||
echo "deb http://packages.erlang-solutions.com/debian jessie contrib" | tee /etc/apt/sources.list.d/erlang-solutions.list
|
||||
elif
|
||||
[ "$(lsb_release --codename --short)" == "stretch" ]; then
|
||||
sudo apt install -y ../conf/esl-erlang_21.2.6-1~debian~stretch_amd64.deb
|
||||
sudo apt install -y ../conf/elixir_1.8.1-2~debian~stretch_amd64.deb
|
||||
echo "deb http://packages.erlang-solutions.com/debian stretch contrib" | tee /etc/apt/sources.list.d/erlang-solutions.list
|
||||
fi
|
||||
sudo wget https://packages.erlang-solutions.com/debian/erlang_solutions.asc
|
||||
sudo apt-key add erlang_solutions.asc
|
||||
sudo rm erlang_solutions.asc
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
|
|
Loading…
Add table
Reference in a new issue