mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-12 14:17:46 +00:00
Fix incorrect user during aws deployment
The TUTOR_USER env variable is not available anymore after running "su", which causes the tutor home to be in /home/.local/share/tutor. So we just get rid of this variable entirely.
This commit is contained in:
parent
0d40d55afc
commit
0c2e33f616
11
cloud/aws.sh
11
cloud/aws.sh
@ -2,7 +2,6 @@
|
|||||||
# Provision an AWS cloud instance with tutor.
|
# Provision an AWS cloud instance with tutor.
|
||||||
# Run with: curl -sSL https://raw.githubusercontent.com/regisb/tutor/master/cloud/aws.sh | bash -e
|
# Run with: curl -sSL https://raw.githubusercontent.com/regisb/tutor/master/cloud/aws.sh | bash -e
|
||||||
|
|
||||||
export TUTOR_USER="$USER"
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
echo "=============== Installing system dependencies"
|
echo "=============== Installing system dependencies"
|
||||||
@ -22,8 +21,8 @@ sudo add-apt-repository \
|
|||||||
stable"
|
stable"
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y docker-ce docker-ce-cli containerd.io
|
sudo apt install -y docker-ce docker-ce-cli containerd.io
|
||||||
sudo usermod -aG docker $TUTOR_USER
|
sudo usermod -aG docker $USER
|
||||||
sudo su - $TUTOR_USER
|
sudo su - $USER
|
||||||
docker run hello-world
|
docker run hello-world
|
||||||
|
|
||||||
echo "=============== Installing docker-compose"
|
echo "=============== Installing docker-compose"
|
||||||
@ -62,9 +61,9 @@ Description=Tutor web UI
|
|||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=$TUTOR_USER
|
User=$USER
|
||||||
WorkingDirectory=/home/$TUTOR_USER
|
WorkingDirectory=/home/$USER
|
||||||
Environment="HOME=/home/$TUTOR_USER"
|
Environment="HOME=/home/$USER"
|
||||||
ExecStart=/usr/local/bin/tutor-webui
|
ExecStart=/usr/local/bin/tutor-webui
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user