Skip to content
Dockerfile 706 B
Newer Older
Pierre Ozoux's avatar
Pierre Ozoux committed
FROM rails
Pierre Ozoux's avatar
Pierre Ozoux committed

WORKDIR /usr/src/app

Pierre Ozoux's avatar
Pierre Ozoux committed
ENV DISCOURSE_VERSION=1.6.0.beta7 \
Pierre Ozoux's avatar
Pierre Ozoux committed
    RAILS_ENV=production \
    RUBY_GC_MALLOC_LIMIT=90000000 \
    DISCOURSE_DB_HOST=postgres \
    DISCOURSE_REDIS_HOST=redis \
    DISCOURSE_SERVE_STATIC_ASSETS=true
Pierre Ozoux's avatar
Pierre Ozoux committed

RUN apt-get update && apt-get install -y --no-install-recommends imagemagick libxml2 \
 && rm -rf /var/lib/apt/lists/*

RUN git clone --branch v${DISCOURSE_VERSION} https://github.com/discourse/discourse.git . \
 && git remote set-branches --add origin tests-passed \
Pierre Ozoux's avatar
Pierre Ozoux committed
 && bundle config build.nokogiri --use-system-libraries \
 && bundle install --deployment --without test --without development

EXPOSE 3000
Pierre Ozoux's avatar
Pierre Ozoux committed
CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"]