Skip to content
Snippets Groups Projects
Commit bdec532e authored by Michał 'rysiek' Woźniak's avatar Michał 'rysiek' Woźniak
Browse files

support for DISCOURSE_ADDITIONAL_GEMS: we need to add the gem(s) to Gemfile and then run bundler

parent dd11d72b
No related branches found
No related tags found
No related merge requests found
......@@ -44,19 +44,24 @@ RUN curl --silent --location https://deb.nodesource.com/setup_4.x | bash - \
RUN git clone --branch v${DISCOURSE_VERSION} https://github.com/discourse/discourse.git . \
&& git remote set-branches --add origin tests-passed \
&& bundle config build.nokogiri --use-system-libraries \
&& bundle install --deployment --without test --without development
&& bundle config build.nokogiri --use-system-libraries
# install additional gems
#
# this expects a space-separated list of gem names
ARG DISCOURSE_ADDITIONAL_GEMS=
RUN if [ "$DISCOURSE_ADDITIONAL_GEMS" != "" ]; then \
echo >> Gemfile \
echo '### DISCOURSE_ADDITIONAL_GEMS' >> Gemfile \
for GEM_NAME in $DISCOURSE_ADDITIONAL_GEMS; do \
bundle exec gem install "$GEM_NAME"; \
# add the gem to the Gemfile
echo "gem \"$GEM_NAME\"" >> Gemfile; \
done; \
fi
# run bundler
RUN bundle install --deployment --without test --without development
# install discourse plugins
# assumptions: no spaces in URLs (urlencoding is a thing)
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment