Commit 782f55e2 authored by BAIRE Anthony's avatar BAIRE Anthony
Browse files

precompile the assets in the docker image

(to speed up the startup)
parent 3a5161b8
......@@ -17,6 +17,8 @@ RUN apply-patches /tmp/ruby/*.diff &&\
chown allgo: /opt &&\
su allgo -c 'sh /tmp/ruby/install.sh'
ENV PATH="/opt/ruby/bin:$PATH"
# install ruby gems
COPY Gemfile* /tmp/
RUN cd /tmp && chown allgo: /tmp/Gemfile* && su allgo -c "bundle install"
......@@ -34,7 +36,6 @@ RUN sh /opt/allgo/deploy/docker/setup/setup.sh
USER allgo
WORKDIR /opt/allgo
ENV PATH="/opt/ruby/bin:$PATH"
CMD ["run-allgo"]
LABEL dk.migrate_always=1
......
......@@ -113,6 +113,9 @@
# end
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# short name for the environment
config.short_env = "prod"
# Code is not reloaded between requests.
config.cache_classes = true
......
......@@ -14,6 +14,11 @@ chown -R nobody: /run
chmod -R og+rwX /run
# precompile assets
cd /opt/allgo
RAILS_ENV=qualification rake assets:precompile
RAILS_ENV=production rake assets:precompile
# install scripts
cd "$SETUP"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment