From 69bc2e18b032549b6206d9e3fd5c344860f9888c Mon Sep 17 00:00:00 2001 From: Per Starke Date: Fri, 23 Feb 2024 11:08:49 +1100 Subject: [PATCH] bretfisher docker container --- Dockerfile | 14 -------- _config-dev.yml | 2 -- _docker-compose-dev.yml | 15 --------- _manage-site.sh | 72 ----------------------------------------- docker-compose.yml | 7 ++++ 5 files changed, 7 insertions(+), 103 deletions(-) delete mode 100644 Dockerfile delete mode 100755 _config-dev.yml delete mode 100644 _docker-compose-dev.yml delete mode 100755 _manage-site.sh create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 5c8466a..0000000 --- a/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM jekyll/builder - -LABEL version="0.8.6" -LABEL description="develop and generate faq.arc42.org site" -LABEL vendor="arc42 (Gernot Starke)" - -COPY Gemfile . - -RUN apk update && \ - apk add ncurses && \ - bundle install - -WORKDIR /srv/jekyll -EXPOSE 4000 diff --git a/_config-dev.yml b/_config-dev.yml deleted file mode 100755 index 4a4aa7f..0000000 --- a/_config-dev.yml +++ /dev/null @@ -1,2 +0,0 @@ -url : "http://0.0.0.0" # the base hostname & protocol -baseurl : # the subpath of your site, e.g. "/blog" diff --git a/_docker-compose-dev.yml b/_docker-compose-dev.yml deleted file mode 100644 index 96b32aa..0000000 --- a/_docker-compose-dev.yml +++ /dev/null @@ -1,15 +0,0 @@ -# docker-compose definition for developing the site. -# -version: '2' - -services: - faq-arc42-jekyll: - build: . - image: doc-arc42-site:latest - command: jekyll serve --trace --host 0.0.0.0 --watch --incremental --config _config.yml,_config-dev.yml - environment: - - JEKYLL_ENV=development - ports: - - 4000:4000 - volumes: - - .:/srv/jekyll diff --git a/_manage-site.sh b/_manage-site.sh deleted file mode 100755 index c5802bd..0000000 --- a/_manage-site.sh +++ /dev/null @@ -1,72 +0,0 @@ -#! /bin/bash -# -# helper, so you don't need to remember docker-compose syntax... - -# what's the site? -site="faq.arc42.org" - -# 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}(d)evelop ${RESET} starts a jekyll server on port 0.0.0.0:4000," -echo "which performs incremental builds and listens for file changes." -echo -echo "${GREEN}(b)build ${RESET} build the required docker image." -echo -echo "${GREEN}(r)emove ${RESET} the running docker container." -echo -#echo "${GREEN}(u)pload ${RESET} the generated site to $server/$remotedir " -#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 - ;; - - d|D|dev|develop) echo "develop, incremental build" - docker-compose --file _docker-compose-dev.yml up - ;; - - r|R|remove) echo "remove running docker container" - docker-compose --file _docker-compose-dev.yml down - ;; - - p|P|production) echo "create production site" - docker-compose --file _docker-compose-prod.yml up - docker-compose --file _docker-compose-prod.yml down - ;; - -# u|U|upload) echo "upload generated site to server" -# docker run -it \ -# --volume $PWD/$localdir:/$localdir \ -# ftp-uploader:0.2.4 \ -# $site $server $localdir $remotedir -# ;; - - # catchall: abort - *) echo "${RED} unknown option $choice ${RESET}, aborted." - exit 1 - ;; -esac - -echo "Thanx." diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..a8789a8 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +services: + jekyll: + image: bretfisher/jekyll-serve + volumes: + - .:/site + ports: + - '4000:4000' \ No newline at end of file