forked from mirte-robot/mirte-install-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_web.sh
More file actions
executable file
·45 lines (34 loc) · 1.19 KB
/
install_web.sh
File metadata and controls
executable file
·45 lines (34 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
MIRTE_SRC_DIR=/usr/local/src/mirte
# Update
sudo apt update
# Install nodeenv
sudo apt install -y python3-pip python3-setuptools python3-wheel
sudo -H pip install nodeenv
# Install nodeenv
nodeenv --node=16.2.0 $MIRTE_SRC_DIR/mirte-web-interface/node_env
# Install web interface
. $MIRTE_SRC_DIR/mirte-web-interface/node_env/bin/activate
# Install frontend
cd $MIRTE_SRC_DIR/mirte-web-interface/vue-frontend || exit
npm install .
npm run build
# Install backend
cd $MIRTE_SRC_DIR/mirte-web-interface/nodejs-backend || exit
npm install .
# Install wetty
#cd $MIRTE_SRC_DIR/mirte-web-interface
#npm -g install wetty
deactivate_node
# Install strace for linetrace functionality
sudo apt install -y strace
# Install nginx (as reverse proxy to all services)
sudo apt install -y nginx
sudo cp $MIRTE_SRC_DIR/mirte-install-scripts/nginx.conf /etc/nginx/
# Add systemd service
sudo rm /lib/systemd/system/mirte-web-interface.service
sudo ln -s $MIRTE_SRC_DIR/mirte-install-scripts/services/mirte-web-interface.service /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl stop mirte-web-interface || /bin/true
sudo systemctl start mirte-web-interface
sudo systemctl enable mirte-web-interface