visit https://shield-k12-playbook.ncsa.illinois.edu
- run
sh exec.sh
sshinto your remote machine- Make suer you already install
git,cron,docker:- Following the instruction of https://docs.docker.com/engine/install/ubuntu/ to install docker.
- Install docker-compose following: https://docs.docker.com/compose/install/
git clonethis repositorygit clone https://github.com/ncsa/ShieldPK12.git- Initialize SSL certificate by run
sh init-letsencrypt.sh, please change the domain name to ones that you own. Right now this domain is pointing towardsshield-k12-playbook.ncsa.illinois.edu. Check init-letsencrypt. sh for more details. - To see if the whole stack comes together by running command
docker-compose up - To shut down the running app, run command
docker-compose down - Important note: you can run cronjob to automatically redploy if there is any change on the code repository.
To do so, follows the below steps:
- Change which git branch to monitor by modifying the
BRANCHvariable in redeploy.sh script.- E.g. point to the current branch:
BRANCH=$(git branch --show-current) - E.g. point to the master branch
BRANCH=master
- E.g. point to the current branch:
- Place
*/5 * * * * (cd /home/ubuntu/ShieldPK12 && sh redeploy.sh > redeploy.log)into a text file, e.g.job.txt - Then run command
crontab job.txt. You can check if cronjob in place bycrontab -l
- Change which git branch to monitor by modifying the
In case you do not own a domain name yet, or just want to deploy the test/develop version of the app, you can deploy without SSL:
- Follow step 1 - 3 in previous section
- Run command
docker-compose -f docker-compose_wo_ssl.yml up --build -d. - Then you can access the web app at
http://{hostIP}. See the custom docker compose file docker-compose_wo_ssl.yml for more details.