mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-14 06:58:21 +00:00
Switch from supervisor to systemd for AWS deployment
This commit is contained in:
parent
20b77f6d5e
commit
285c75a1f0
24
cloud/aws.sh
24
cloud/aws.sh
@ -13,8 +13,7 @@ sudo apt update \
|
|||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl \
|
curl \
|
||||||
gnupg-agent \
|
gnupg-agent \
|
||||||
software-properties-common \
|
software-properties-common
|
||||||
supervisor
|
|
||||||
|
|
||||||
echo "=============== Installing docker"
|
echo "=============== Installing docker"
|
||||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
||||||
@ -48,9 +47,18 @@ fi
|
|||||||
tutor webui start' | sudo tee /usr/local/bin/tutor-webui
|
tutor webui start' | sudo tee /usr/local/bin/tutor-webui
|
||||||
sudo chmod +x /usr/local/bin/tutor-webui
|
sudo chmod +x /usr/local/bin/tutor-webui
|
||||||
|
|
||||||
echo "=============== Configuring supervisor"
|
echo "=============== Configuring systemd"
|
||||||
echo "[program:tutor]
|
echo "[Unit]
|
||||||
command=/usr/local/bin/tutor-webui
|
Description=Tutor web UI
|
||||||
environment=HOME=/home/$TUTOR_USER
|
After=network.target
|
||||||
autorestart=true
|
|
||||||
user=$TUTOR_USER" | sudo tee /etc/supervisor/conf.d/tutor.conf
|
[Service]
|
||||||
|
User=$TUTOR_USER
|
||||||
|
WorkingDirectory=/home/$TUTOR_USER
|
||||||
|
Environment="HOME=/home/$TUTOR_USER"
|
||||||
|
ExecStart=/usr/local/bin/tutor-webui
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target" | sudo tee /etc/systemd/system/tutor-webui.service
|
||||||
|
sudo systemctl enable tutor-webui
|
||||||
|
Loading…
Reference in New Issue
Block a user