From 567f8b82ee030bb706863dade1ae3cb11913e629 Mon Sep 17 00:00:00 2001 From: Lukas Pol Date: Fri, 24 Apr 2020 17:11:35 -0300 Subject: [PATCH] add yarn check-file in Dockerfile and bundle check Signed-off-by: Lukas Pol --- ruby_on_rails-postgres/docker-compose.yml | 2 +- ruby_on_rails-postgres/web/Dockerfile | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ruby_on_rails-postgres/docker-compose.yml b/ruby_on_rails-postgres/docker-compose.yml index 0e751ba..e681b73 100644 --- a/ruby_on_rails-postgres/docker-compose.yml +++ b/ruby_on_rails-postgres/docker-compose.yml @@ -9,7 +9,7 @@ services: POSTGRES_HOST_AUTH_METHOD: trust web: build: ./web - command: bash -c "rm -f tmp/pids/server.pid && yarn install --check-files && rake db:create db:migrate && bundle exec rails s -b 0.0.0.0" + command: bash -c "rm -f tmp/pids/server.pid && rake db:drop db:create db:migrate && bundle exec rails s -b 0.0.0.0" volumes: - ./web:/myapp ports: diff --git a/ruby_on_rails-postgres/web/Dockerfile b/ruby_on_rails-postgres/web/Dockerfile index 7c32753..5d72f46 100644 --- a/ruby_on_rails-postgres/web/Dockerfile +++ b/ruby_on_rails-postgres/web/Dockerfile @@ -15,7 +15,8 @@ COPY Gemfile.lock /myapp/Gemfile.lock ## RUN gem install bundler:2.0.2 -RUN bundle install +RUN bundle check || bundle install +RUN yarn install --check-files COPY . /myapp ## Add Endpoint