mirror of
https://github.com/YunoHost/ynh-dev.git
synced 2024-09-03 20:05:59 +02:00
[fix] Yunohost Admin hot reload
This commit is contained in:
parent
32fec007e7
commit
e0b6b03f29
1 changed files with 25 additions and 1 deletions
26
ynh-dev
26
ynh-dev
|
@ -304,6 +304,16 @@ EOF
|
||||||
if [[ ! -e node_modules/@vue/cli-service/bin/vue-cli-service.js ]]
|
if [[ ! -e node_modules/@vue/cli-service/bin/vue-cli-service.js ]]
|
||||||
then
|
then
|
||||||
info "Installing dependencies to develop in yunohost-admin ..."
|
info "Installing dependencies to develop in yunohost-admin ..."
|
||||||
|
DISTRO="$(lsb_release -s -c)"
|
||||||
|
if [ "$DISTRO" == "buster" ]; then
|
||||||
|
KEYRING=/usr/share/keyrings/nodesource.gpg
|
||||||
|
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | sudo tee "$KEYRING" >/dev/null
|
||||||
|
gpg --no-default-keyring --keyring "$KEYRING" --list-keys
|
||||||
|
VERSION=node_8.x
|
||||||
|
KEYRING=/usr/share/keyrings/nodesource.gpg
|
||||||
|
echo "deb [signed-by=$KEYRING] https://deb.nodesource.com/$VERSION $DISTRO main" | sudo tee /etc/apt/sources.list.d/nodesource.list
|
||||||
|
fi
|
||||||
|
apt-get update
|
||||||
apt install nodejs npm -y
|
apt install nodejs npm -y
|
||||||
npm install -g npm@latest
|
npm install -g npm@latest
|
||||||
fi
|
fi
|
||||||
|
@ -313,7 +323,21 @@ EOF
|
||||||
success "Now using Git repository for yunohost-admin"
|
success "Now using Git repository for yunohost-admin"
|
||||||
cat <<EOF > /etc/nginx/conf.d/yunohost_admin.conf.inc
|
cat <<EOF > /etc/nginx/conf.d/yunohost_admin.conf.inc
|
||||||
location /yunohost/admin {
|
location /yunohost/admin {
|
||||||
proxy_pass https://localhost:8080/yunohost/admin;
|
proxy_pass http://localhost:8080/yunohost/admin;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_set_header Host \$host;
|
||||||
|
proxy_set_header X-Real-IP \$remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-Proto \$scheme;
|
||||||
|
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Host \$server_name;
|
||||||
|
proxy_set_header X-Forwarded-Port \$server_port;
|
||||||
|
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade \$http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
}
|
||||||
|
location /sockjs-node {
|
||||||
|
proxy_pass http://localhost:8080/sockjs-node;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
proxy_set_header Host \$host;
|
proxy_set_header Host \$host;
|
||||||
proxy_set_header X-Real-IP \$remote_addr;
|
proxy_set_header X-Real-IP \$remote_addr;
|
||||||
|
|
Loading…
Add table
Reference in a new issue