blob: 91ec526f28699ff050c154a1a5c14b8e714be0ec [file] [log] [blame]
#! /bin/bash
# This script can be called directly like this.
# curl -s -f https://raw.githubusercontent.com/apache/myfaces-homepage/master/tobago/tobago-vm/setup.sh | bash
set -e
BRANCH=master
#BRANCH=tobago-vm
cd /home/tobago
curl https://codeload.github.com/apache/myfaces-homepage/tar.gz/refs/heads/${BRANCH} | tar xz --strip=2 myfaces-homepage-${BRANCH}/tobago/tobago-vm
cd tobago-vm
/usr/local/bin/docker-compose down
/usr/bin/docker system prune -f
/usr/local/bin/docker-compose build
/usr/local/bin/docker-compose up -d
# need to wait for Let's encrypt
sleep 60
/usr/bin/docker exec tobago-vm_apache_1 apachectl graceful