diff --git a/deploy_editor.sh b/deploy_editor.sh new file mode 100755 index 0000000..cc9ab08 --- /dev/null +++ b/deploy_editor.sh @@ -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" diff --git a/deploy_frontend.sh b/deploy_frontend.sh new file mode 100755 index 0000000..0575470 --- /dev/null +++ b/deploy_frontend.sh @@ -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" diff --git a/editor/package.json b/editor/package.json index 75b1233..2985e68 100644 --- a/editor/package.json +++ b/editor/package.json @@ -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" diff --git a/site.conf b/site.conf index d8d7560..c7c2861 100644 --- a/site.conf +++ b/site.conf @@ -5,6 +5,10 @@ server { proxy_pass http://localhost:8080; } + location /editor { + alias /var/www/html/editor; + } + location / { root /var/www/html/frontend; }