add editor

This commit is contained in:
Francis 2021-09-23 21:24:27 +02:00
parent 019e406a0f
commit b009072ce5
No known key found for this signature in database
GPG Key ID: 071BEA4C2B10077C
4 changed files with 16 additions and 1 deletions

7
deploy_editor.sh Executable file
View File

@ -0,0 +1,7 @@
set -x
cd editor
npm ci
npm run build
zip editor.zip dist/*
scp editor.zip root@10.1.0.212:/tmp/editor.zip
ssh root@10.1.0.212 "set -x && cd /tmp && unzip -u editor.zip && cd dist && rm -r /var/www/html/editor/* && cp -r * /var/www/html/editor && chown -R www-data:www-data /var/www/html/editor"

4
deploy_frontend.sh Executable file
View File

@ -0,0 +1,4 @@
set -x
zip frontend.zip frontend/*
scp frontend.zip root@10.1.0.212:/tmp/frontend.zip
ssh root@10.1.0.212 "set -x && cd /tmp && unzip -u frontend.zip && cd frontend && rm -r /var/www/html/frontend/* && cp -r * /var/www/html/frontend && chown -R www-data:www-data /var/www/html/frontend"

View File

@ -6,7 +6,7 @@
"bugs": "https://github.com/ZeusWPI/ledstrip_sandbox/issues",
"scripts": {
"start": "parcel *.html *.js *.ts",
"build": "rm -rf dist/ && npm run generate && parcel build --public-url ./ *.html *.ts *.js"
"build": "rm -rf dist/ && parcel build --public-url ./ *.html *.ts *.js"
},
"keywords": [
"Editor"

View File

@ -5,6 +5,10 @@ server {
proxy_pass http://localhost:8080;
}
location /editor {
alias /var/www/html/editor;
}
location / {
root /var/www/html/frontend;
}