diff --git a/Dockerfile b/Dockerfile index 377cb8fb696ca56ef40368c06255cbc02ac885e8..aa4e46cd0ffce175e91b2ea73cf0b489708cb030 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ ENV DISCOURSE_VERSION=1.7.0.beta3 \ DISCOURSE_SERVE_STATIC_ASSETS=true \ GIFSICLE_VERSION=1.87 \ PNGQUANT_VERSION=2.4.1 - + RUN curl --silent --location https://deb.nodesource.com/setup_4.x | bash - \ && apt-get update && apt-get install -y --no-install-recommends \ autoconf \ @@ -46,6 +46,22 @@ RUN git clone --branch v${DISCOURSE_VERSION} https://github.com/discourse/discou && git remote set-branches --add origin tests-passed \ && bundle config build.nokogiri --use-system-libraries \ && bundle install --deployment --without test --without development + + +# install discourse plugins +# assumptions: no spaces in URLs (urlencoding is a thing) +# +# this expects a git-cloneable link +ARG DISCOURSE_ADDITIONAL_PLUGINS= +RUN if [ "$DISCOURSE_ADDITIONAL_PLUGINS" != "" ]; then \ + cd plugins/ \ + for PACKAGE_LINK in $DISCOURSE_ADDITIONAL_PLUGINS; do \ + git clone "$PACKAGE_LINK"; \ + done; \ + bundle exec rake plugin:update plugin=discourse-plugin-checklist; \ + bundle exec rake assets:clean; \ + bundle exec rake assets:precompile; \ + fi EXPOSE 3000 CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"]