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