Skip to content

Commit

Permalink
Speed up bundle install and adds bundle cache volume
Browse files Browse the repository at this point in the history
  • Loading branch information
rodolfobandeira committed Oct 11, 2021
1 parent 99ad184 commit 6e9a930
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ COPY Gemfile Gemfile.lock /app/

WORKDIR /app/

RUN bundle install
RUN bundle install --jobs=2

ENTRYPOINT ["./scripts/remove_server_pid.sh"]
CMD bundle exec rails server -b 0.0.0.0 -p 3000
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
- "3000:3000"
volumes:
- "./:/app/"
- bundle_cache:/usr/local/bundle
db:
image: postgres:13
env_file:
Expand All @@ -26,3 +27,5 @@ services:
volumes:
# Volume to hold the Postgres database on the host system
data:
bundle_cache:
driver: local

0 comments on commit 6e9a930

Please sign in to comment.