From: Jamie Alessio Date: Tue, 29 Dec 2020 18:11:15 +0000 (-0800) Subject: Prevent node_modules from mounting to save rake yarn:install step X-Git-Tag: live~1662^2~4 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/2da3ce6abfab55aa14f8fae4ae97abd5cf8a94ba Prevent node_modules from mounting to save rake yarn:install step --- diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index c7874db39..c3b48d561 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -25,7 +25,6 @@ jobs: run: | docker-compose run --rm web rake db:migrate docker-compose run --rm web osmosis --rx docker/null-island.osm.xml --wd host=db database=openstreetmap user=openstreetmap password=openstreetmap validateSchemaVersion=no - docker-compose run web bundle exec rake yarn:install - name: Test Basic Website run: | curl -siL http://127.0.0.1:3000 | egrep '^HTTP/1.1 200 OK' diff --git a/DOCKER.md b/DOCKER.md index e2c2d2129..d5a673bbe 100644 --- a/DOCKER.md +++ b/DOCKER.md @@ -58,12 +58,6 @@ Run the test suite by running: docker-compose run --rm web bundle exec rake test:db -### Node Modules - -Install required front-end Node modules: - - docker-compose run --rm web bundle exec rake yarn:install - ### Loading an OSM extract This installation comes with no geographic data loaded. You can either create new data using one of the editors (Potlatch 2, iD, JOSM etc) or by loading an OSM extract. Here an example for loading an OSM extract into your Docker-based OSM instance. diff --git a/docker-compose.yml b/docker-compose.yml index 9719f0e7b..f03d315c7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,8 @@ services: - .:/app # don't mount tmp directory (https://github.com/Shopify/bootsnap/issues/177) - /app/tmp + # Prevent node_modules from mounting so it's not shared between host OS and Docker + - /app/node_modules/ ports: - "3000:3000" environment: