From 073c9ffef9edca7e267d98fe906454633ccd320d Mon Sep 17 00:00:00 2001 From: "Dr. Gernot Starke" Date: Wed, 25 Oct 2023 11:39:32 +0200 Subject: [PATCH] only use docker-compose up to build/test this site --- README.md | 8 ++---- _manage-site.sh | 76 ------------------------------------------------- 2 files changed, 3 insertions(+), 81 deletions(-) delete mode 100755 _manage-site.sh diff --git a/README.md b/README.md index 0b0b509..c80b06e 100755 --- a/README.md +++ b/README.md @@ -28,13 +28,11 @@ You have an environment that allows to run - a bash script (`/bin/bash`) - [docker](https://docs.docker.com/build/building/context/) and [docker-compose](https://docs.docker.com/compose/) -### Build +### Build and test -In the root directory you find the script `_manage-site.sh`. Run it: +In the root directory, run `docker compose up`. -`quality.arc42.org-site (main)$ ./_manage-site.sh`. -Once executed the script suggests the possible commands. Only after you have chosen a command it will actually do something, i.e. to build and run it. The script starts a server with the updated website that you access via `http://localhost:4000`. ## How to contribute @@ -42,4 +40,4 @@ Create a fork of [https://github.com/arc42/quality.arc42.org-site](https://githu Hint: `_todo-qualities` contains qualities whose definitions are missing. You may fill those files with content. Then move them to the appropriate folder (e.g. `qualities//_posts`). -Hint: If you add new files you have to clean-rebuild the whole application. The watch is only for modifications of existing files. \ No newline at end of file +Hint: If you add new files you have to clean-rebuild the whole application. \ No newline at end of file diff --git a/_manage-site.sh b/_manage-site.sh deleted file mode 100755 index 48da40f..0000000 --- a/_manage-site.sh +++ /dev/null @@ -1,76 +0,0 @@ -#! /bin/bash -# -# helper, so you don't need to remember docker-compose syntax... - -# what's the site? -site="quality.arc42.org" - -remotedir="." - -# some colors to highlight certain output -GREEN=`tput setaf 2` -RED=`tput setaf 5` -BLUE=`tput setaf 6` -RESET=`tput sgr0` - -clear - -echo -echo "Docker container to develop or build the ${BLUE}$site ${RESET}website:" -echo "============================================================" -echo -echo "Please select wether to ${GREEN}develop ${RESET} or ${RED} build ${RESET} the site:" -echo -echo "${GREEN}(c)lean ${RESET} _site directory" -echo -echo "${GREEN}(d)evelop ${RESET} starts a jekyll server on port 0.0.0.0:4000, with incremental build and change listener." -echo -echo "${GREEN}(b)build ${RESET} build the required docker image." -echo -echo "${GREEN}(r)emove ${RESET} the running docker container." -echo -echo "${GREEN}(a)pple silicon ${RESET} specific container on port 0.0.0.0:4000." -echo -echo "==================================================" -echo - -read -p "Enter your selection (default: develop, d) : " choice - - -if [[ -z $choice ]]; then - choice='develop' -fi - -case "$choice" in - b|B|build) echo "build Docker image" - docker-compose --file _docker-compose-dev.yml build --force-rm - ;; - - c|C|clean) echo "clean _site directory" - rm -r _site - ;; - - d|D|dev|develop) echo "develop, incremental build" - rm -r _site - docker-compose --file _docker-compose-dev.yml up - ;; - - a|A|apple) echo "develop, for apple silicon" - rm -r _site - docker run -p 4000:4000 -v $(pwd):/site bretfisher/jekyll-serve - ;; - - r|R|remove) echo "remove running docker container" - docker-compose --file _docker-compose-dev.yml down - ;; - - - - - # catchall: abort - *) echo "${RED} unknown option $choice ${RESET}, aborted." - exit 1 - ;; -esac - -echo "Thanx."