mirror of
https://github.com/openSUSE/osem.git
synced 2025-12-23 22:28:15 -05:00
- No need to manually install bundler anymore - bundle to vendor/bundle - build nokogiri against system libraries - expose the port foreman is using - serve static files
31 lines
790 B
Docker
31 lines
790 B
Docker
FROM registry.opensuse.org/opensuse/infrastructure/dale/containers/osem/base:latest
|
|
|
|
EXPOSE 5000
|
|
|
|
ENV RAILS_ENV=production
|
|
ENV RAILS_SERVE_STATIC_FILES=true
|
|
|
|
# Add our files
|
|
COPY --chown=1000:1000 . /osem/
|
|
|
|
# Install foreman
|
|
RUN gem install foreman
|
|
|
|
USER osem
|
|
WORKDIR /osem/
|
|
|
|
RUN rm -rf /osem/public/system/sponsors; mkdir -p /osem/public/system/sponsors; \
|
|
rm -rf /osem/public/assets; mkdir -p /osem/public/assets; \
|
|
rm -rf /osem/log; mkdir -p /osem/public/assets
|
|
|
|
# Install our bundle
|
|
RUN bundle config set --local without 'test development'; \
|
|
bundle config set --local path 'vendor/bundle'; \
|
|
bundle config build.nokogiri --use-system-libraries; \
|
|
bundle install --jobs=4 --retry=3
|
|
|
|
# Generate assets
|
|
RUN bundle exec rake assets:precompile
|
|
|
|
CMD ["foreman", "start"]
|