diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2022-10-07 11:46:51 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2022-10-13 09:53:29 +0300 |
commit | 067a311acef03005c1c50f0c850a9c6d97f7f914 (patch) | |
tree | 10d74048dfe11e61a8eb6a1c58253823b88b50ae /dockerfiles | |
parent | 39551dd7e9886f728bbb1ab850573de38dd032e7 (diff) |
Build a Docker image with lunr.js enabledaxil-create-lunrjs-docker-image
Diffstat (limited to 'dockerfiles')
-rw-r--r-- | dockerfiles/single.Dockerfile | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/dockerfiles/single.Dockerfile b/dockerfiles/single.Dockerfile index 49c58393..ca96e568 100644 --- a/dockerfiles/single.Dockerfile +++ b/dockerfiles/single.Dockerfile @@ -26,8 +26,10 @@ COPY --from=minifier /minify /usr/local/bin/minify # Set versions as build args to fetch corresponding branches ARG VER +ARG ALGOLIA_SEARCH ENV CI_COMMIT_REF_NAME=$VER +ENV ALGOLIA_SEARCH=$ALGOLIA_SEARCH # Set NANOC_ENV to production ENV NANOC_ENV=production @@ -78,6 +80,8 @@ RUN yarn install --frozen-lockfile \ && bundle exec rake default \ && bundle exec nanoc compile -VV +RUN if [ "$ALGOLIA_SEARCH" = "false" ]; then echo "Building lunr.js..." && node scripts/lunr/preindex.js; fi + # Move generated HTML to /site RUN mkdir /site \ && mv public "/site/${VER}" |