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

Fixed static file error in nginx and fix upgrade script

This commit is contained in:
anmol 2018-11-11 03:44:44 +05:30
parent d1d930d2b5
commit 3fe878adab
2 changed files with 7 additions and 3 deletions

View file

@ -1,9 +1,11 @@
location ~* \.(jpg|jpeg|png|gif|ico|js|pdf)$ {
root __FINALPATH__/__APP__
add_header Cache-Control "public";
expires 7d;
}
location / {
proxy_pass http://localhost:__PORT__/;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;

View file

@ -41,8 +41,6 @@ elif [ "$is_public" = "No" ]; then
fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
@ -98,8 +96,12 @@ ynh_install_app_dependencies gettext postgresql postgresql-contrib libpq-dev git
( cd $final_path/$app && git pull )
# Give permisiion to the final_path
chown -R "$app":"$app" "$final_path"
( cd $final_path && sudo -u "$app" curl -sf -L https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly --date=2018-07-17 )
export PATH="$PATH:/var/www/$app/.cargo/bin:/var/$app/.local/bin:/usr/local/sbin"
export FEATURES=postgres
chown -R "$app":"$app" "$final_path"
( cd $final_path/$app && sudo -u "$app" cargo install diesel_cli --no-default-features --features postgres --version '=1.3.0' )
( cd $final_path/$app && sudo -u "$app" cargo install --force )
( cd $final_path/$app && sudo -u "$app" cargo install --path plume-cli --force )
( cd $final_path/$app && diesel migration run )