From 42e6e4f235370297d656017a34c400eec66b0ea1 Mon Sep 17 00:00:00 2001 From: Ahmad Farhat Date: Wed, 22 Jan 2020 16:21:16 -0500 Subject: [PATCH] GRN2-241: Moved assets precompile to start script (#927) * Moved assets precompile to start script * Added curl to image for postgres database --- Dockerfile | 6 ++---- bin/start | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index bbfeaf96..d2fbe32e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,10 +31,8 @@ RUN bundle config --global frozen 1 \ # Adding project files. COPY . . -RUN SECRET_KEY_BASE="1" bin/rails assets:precompile - # Remove folders not needed in resulting image -RUN rm -rf tmp/cache app/assets vendor/assets spec +RUN rm -rf tmp/cache spec ############### Build step done ############### @@ -42,7 +40,7 @@ FROM ruby:2.5.1-alpine # Set a variable for the install location. ARG RAILS_ROOT=/usr/src/app -ARG PACKAGES="tzdata postgresql-client sqlite-libs nodejs bash" +ARG PACKAGES="tzdata curl postgresql-client sqlite-libs yarn nodejs bash" ENV RAILS_ENV=production ENV BUNDLE_APP_CONFIG="$RAILS_ROOT/.bundle" diff --git a/bin/start b/bin/start index 80a1b25d..c04c5cab 100755 --- a/bin/start +++ b/bin/start @@ -19,4 +19,6 @@ else bundle exec rake db:schema:load fi +bundle exec rake assets:precompile + exec bundle exec puma -C config/puma.rb