mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-12 14:17:46 +00:00
Dynamically set webui password on AWS
This commit is contained in:
parent
5938933dbb
commit
9922b781f4
11
cloud/aws.sh
11
cloud/aws.sh
@ -39,12 +39,17 @@ echo "=============== Building docker images"
|
||||
tutor images env
|
||||
tutor images build all
|
||||
|
||||
echo "=============== Configure Web UI login/password"
|
||||
tutor webui configure --user tutor --password "$(curl http://169.254.169.254/latest/meta-data/public-hostname)"
|
||||
echo "=============== Create Web UI script"
|
||||
echo '#! /bin/bash
|
||||
if [ ! -f $(tutor config printroot)/env/webui/config.yml ]; then
|
||||
tutor webui configure --user tutor --password "$(curl http://169.254.169.254/latest/meta-data/instance-id)"
|
||||
fi
|
||||
tutor webui start' | sudo tee /usr/local/bin/tutor-webui
|
||||
sudo chmod +x /usr/local/bin/tutor-webui
|
||||
|
||||
echo "=============== Configuring supervisor"
|
||||
echo "[program:tutor]
|
||||
command=/usr/local/bin/tutor webui start
|
||||
command=/usr/local/bin/tutor-webui
|
||||
environment=HOME=/home/$TUTOR_USER
|
||||
autorestart=true
|
||||
user=$TUTOR_USER" | sudo tee /etc/supervisor/conf.d/tutor.conf
|
||||
|
Loading…
Reference in New Issue
Block a user