diff --git a/docker-compose.yml b/docker-compose.yml index 79305fb..bd5d1aa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: "3" services: 5etools-docker: container_name: 5etools-docker - image: jafner/5etools-docker + image: 5etools-docker:dev # jafner/5etools-docker volumes: - 5etools-docker:/usr/local/apache2/htdocs ports: @@ -10,7 +10,7 @@ services: environment: - SOURCE=GITHUB-NOIMG # Required unless OFFLINE_MODE=TRUE - # Expects one of "GITHUB", "GITHUB-NOIMG", "GET5ETOOLS", or "GET5ETOOLS-NOIMG". Where: + # Expects one of GITHUB, GITHUB-NOIMG, GET5ETOOLS, or GET5ETOOLS-NOIMG. Where: # GITHUB pulls from https://github.com/5etools-mirror-1/5etools-mirror-1 # GITHUB-NOIMG pulls from https://github.com/5etools-mirror-1/5etools-mirror-1 without image files. # GET5ETOOLS pulls from https://get.5e.tools diff --git a/init.sh b/init.sh index 2face3e..b2e82ac 100644 --- a/init.sh +++ b/init.sh @@ -37,8 +37,9 @@ echo " === Checking directory permissions for /usr/local/apache2/htdocs" ls -ld /usr/local/apache2/htdocs SOURCE=${SOURCE} +echo "SOURCE=$SOURCE" case $SOURCE in - "GITHUB" | "GITHUB-NOIMG") # Source is the github mirror + GITHUB | GITHUB-NOIMG) # Source is the github mirror DL_LINK=https://github.com/5etools-mirror-1/5etools-mirror-1.github.io.git echo " === Using GitHub mirror at $DL_LINK" if [ ! -d "./.git" ]; then # if no git repository already exists @@ -60,12 +61,14 @@ case $SOURCE in echo " === Pulling from GitHub with images... (This will take a while)" fi git checkout + git fetch + git pull VERSION=$(jq -r .version package.json) # Get version from package.json echo " === Starting version $VERSION" httpd-foreground ;; - "GET5ETOOLS" | "GET5ETOOLS-NOIMG") + GET5ETOOLS | GET5ETOOLS-NOIMG) DL_LINK=https://get.5e.tools echo " === Using get structure to download from $DL_LINK" echo " === WARNING: This part of the script has not yet been tested. Please open an issue on the github if you have trouble."