aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVeikka Kähkönen <insiding@gmail.com>2017-10-17 21:17:13 +0300
committerVeikka Kähkönen <insiding@gmail.com>2017-10-17 21:17:13 +0300
commit53cc538e20fcac9454f9ec61082161933d1de867 (patch)
treef30a405bf4c233fd63fca01cc35e5bc5b2570cde
parent5fdc772599a8c695697f388b635679af07a24a2e (diff)
Document the COMMIT_HASH environment variable / Docker argument
-rw-r--r--docker-compose.yml4
-rw-r--r--jekyll.docker2
2 files changed, 6 insertions, 0 deletions
diff --git a/docker-compose.yml b/docker-compose.yml
index b845967..eee38c5 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -5,6 +5,10 @@ services:
context: "."
dockerfile: "jekyll.docker"
args:
+ # Set this environment variable to the value of the latest
+ # Git commit hash to rebuild only the relevant parts of the
+ # Jekyll image.
+ # E.g. COMMIT_HASH=hash_here docker-compose up --build
- COMMIT_HASH=${COMMIT_HASH}
volumes_from:
- nginx
diff --git a/jekyll.docker b/jekyll.docker
index d68843a..809d994 100644
--- a/jekyll.docker
+++ b/jekyll.docker
@@ -6,6 +6,8 @@ VOLUME ["/usr/share/nginx/html"]
RUN apk update && apk add ruby ruby-dev libffi-dev build-base git
RUN gem install jekyll json --no-doc --no-ri
+# If this argument has changed, Docker will only use cached data until this
+# point
ARG COMMIT_HASH
RUN git clone --single-branch --depth 1 https://github.com/kauha/uudempiAS.git \