Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bundler before bundle install #8101

Merged
merged 14 commits into from
Jul 1, 2020
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ RUN wget https://github.com/webnicer/chrome-downloads/raw/master/x64.deb/google-
mv chromedriver /usr/local/bin/chromedriver && \
chmod +x /usr/local/bin/chromedriver

ENV BUNDLER_VERSION=2.1.4
WORKDIR /tmp
ADD Gemfile /tmp/Gemfile
ADD Gemfile.lock /tmp/Gemfile.lock
RUN bundle update --bundler && \
RUN gem install --default bundler && \
gem update --system && \
bundle install --jobs=4

WORKDIR /app
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build:
redeploy-container:
docker-compose build --pull
docker-compose run --rm web yarn install
docker-compose run --rm web bash -c "rake db:migrate && rake assets:precompile && rake tmp:cache:clear"
docker-compose run --rm web bash -c "bundle exec rake db:migrate && bundle exec rake assets:precompile && bundle exec rake tmp:cache:clear"
docker-compose down --remove-orphans
rm -f ./tmp/pids/server.pid
docker-compose up -d
Expand All @@ -19,7 +19,7 @@ redeploy-container:

deploy-container:
docker-compose run --rm web yarn install
docker-compose run --rm web bash -c "sleep 5 && rake db:migrate && rake assets:precompile"
docker-compose run --rm web bash -c "sleep 5 && bundle exec rake db:migrate && bundle exec rake assets:precompile"
rm -f ./tmp/pids/server.pid
docker-compose up -d
docker-compose exec -T web bash -c "echo 172.17.0.1 smtp >> /etc/hosts"
Expand All @@ -30,11 +30,11 @@ deploy-container:

test-container:
docker-compose up -d
docker-compose exec -T web rake db:setup
docker-compose exec -T web rake db:migrate
docker-compose exec -T web yarn install
docker-compose exec -T web rake assets:precompile
docker-compose exec -T web rake test:all
docker-compose exec -T web bundle exec rake db:setup
docker-compose exec -T web bundle exec rake db:migrate
docker-compose exec -T web bundle exec yarn install
docker-compose exec -T web bundle exec rake assets:precompile
docker-compose exec -T web bundle exec rake test:all
docker-compose exec -T web rails test -d
docker-compose down

Expand Down