From bbd10aaedfeb6e4106a63337bca308fea192b9e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=27rysiek=27=20Wo=C5=BAniak?= <rysiek@hackerspace.pl> Date: Mon, 12 Dec 2016 02:24:43 +0100 Subject: [PATCH] support for DISCOURSE_ADDITIONAL_GEMS: properly handling bundle deployment vs. DISCOURSE_ADDITIONAL_GEMS --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 30dfc1b..f7e5e4b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -59,8 +59,12 @@ RUN if [ "$DISCOURSE_ADDITIONAL_GEMS" != "" ]; then \ fi # run bundler -#RUN bundle install --deployment --without test --without development -RUN bundle install --without test --without development +# deployment mode if no new gems added, normal mode otherwise +RUN if [ "$DISCOURSE_ADDITIONAL_GEMS" != "" ]; then \ + bundle install --without test --without development; \ + else \ + bundle install --deployment --without test --without development; \ + fi # install discourse plugins # assumptions: no spaces in URLs (urlencoding is a thing) -- GitLab