zeus 4 years ago
parent
commit
947829e993
  1. 1
      Dockerfile
  2. 12
      startup.sh

1
Dockerfile

@ -7,6 +7,7 @@ LABEL MAINTAINERS="Guillaume Scheibel <guillaume.scheibel@gmail.com>, Damien DUP
# build/llo-base-images/asciidoctor-alpine/docker-asciidoctor
RUN apk add --no-cache \
bash \
sudo \
curl \
ca-certificates \
findutils \

12
startup.sh

@ -55,11 +55,14 @@ read -r -d '' VAR <<EOF
if [ ! -d "$REPO" ] ; then
cd /home/$USER
git clone $GIT_TUTOR
chown -R $USER.$USER /home/$USER
else
cd /home/$USER/$REPO
git fetch origin master
git reset --hard FETCH_HEAD
git clean -df
chown -R $USER.$USER /home/$USER
fi
@ -75,12 +78,10 @@ chmod +x /home/$USER/crond/playground-sync.sh
read -r -d '' VAR <<EOF
#!/bin/bash
cd /home/$USER/$REPO/swarmlab-app/src
npm install;
npm cache clean --force;
sudo -H -u node /bin/bash -c 'cd /home/$USER/$REPO/swarmlab-app/src; npm install; npm cache clean --force;'
EOF
echo "$VAR" > /home/$USER/crond/playground-sync.sh
echo "$VAR" > /home/$USER/crond/playground-npm-install.sh
@ -138,7 +139,8 @@ chown -R $USER.$USER /home/$USER
chmod -R 755 /home/$USER
/home/$USER/crond/playground-start.sh
/home/$USER/crond/playground-sync.sh
sudo -H -u node bash /home/$USER/crond/playground-npm-install.sh
/home/$USER/crond/playground-start.sh
/usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf

Loading…
Cancel
Save