mirror of
https://github.com/YunoHost-Apps/mastodon_ynh.git
synced 2024-09-03 19:46:02 +02:00
Fix upgrade 1.4 (#33)
* [fix] Upgrade nodejs + conf protobuf Fix mastodon 1.4 upgrade
This commit is contained in:
parent
e52a9dcb50
commit
3a02566f0a
2 changed files with 21 additions and 1 deletions
|
@ -1,6 +1,9 @@
|
|||
# upload max size
|
||||
client_max_body_size 100M;
|
||||
|
||||
# add to v1.4 assets
|
||||
root /opt/mastodon/live/public;
|
||||
|
||||
location / {
|
||||
|
||||
if ($scheme = http) {
|
||||
|
@ -13,6 +16,12 @@ location / {
|
|||
include conf.d/yunohost_panel.conf.inc;
|
||||
}
|
||||
|
||||
# add to v1.4 assets
|
||||
location ~ ^/(assets|system/media_attachments/files|system/accounts/avatars) {
|
||||
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||
try_files $uri @proxy;
|
||||
}
|
||||
|
||||
location @proxy {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
|
|
@ -65,6 +65,17 @@ pushd ~/live
|
|||
git checkout $version
|
||||
SWITCHCOMMANDS
|
||||
|
||||
# upgrade Node.js v4 to v6
|
||||
node_version=$(nodejs --version)
|
||||
if [[ $node_version =~ ^v4.*$ ]]; then
|
||||
pushd /opt
|
||||
curl -sL https://deb.nodesource.com/setup_6.x | sudo bash -
|
||||
sudo apt-get -y install nodejs
|
||||
fi
|
||||
|
||||
# add additional package for release 1.4
|
||||
ynh_package_install pkg-config libprotobuf-dev protobuf-compiler
|
||||
|
||||
# Apply Mastodon upgrade
|
||||
sudo su - $app <<COMMANDS
|
||||
pushd ~/live
|
||||
|
|
Loading…
Reference in a new issue