From 58e04e7c345aaac19660dd03414d008f7e5853dd Mon Sep 17 00:00:00 2001 From: Bruno Casali Date: Wed, 7 Oct 2020 11:30:25 -0300 Subject: [PATCH] Use a volume to deal with bundled gems This way we don't need to rebuild everytime we add/update/remove a gem --- docker-compose.yml | 7 +++++++ setup/entry | 3 +++ 2 files changed, 10 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 3dfaff53..67bb5790 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,9 +1,15 @@ version: '3' + +volumes: + bundle: + driver: local + services: db: image: postgres:alpine environment: POSTGRES_PASSWORD: uaI7m2kmWd949DMv4dCh + web: environment: PGPASSWORD: uaI7m2kmWd949DMv4dCh @@ -13,6 +19,7 @@ services: volumes: - .:/refugerestrooms - /refugerestrooms/node_modules + - bundle:/usr/local/bundle ports: - "3000:3000" depends_on: diff --git a/setup/entry b/setup/entry index 37c06f7d..abbbb445 100755 --- a/setup/entry +++ b/setup/entry @@ -1,6 +1,9 @@ #!/bin/bash set -e +# Check by local gems and if is something is missing, run bundle install +bundle check || bundle install --jobs 20 --retry 5 + # Set up the database for development, and seed with placeholder data from `db/export.csv` SEEDING_DONT_GEOCODE="true" rails db:setup