[openstreetmap/openstreetmap-website] Add Docker Compose Support for Development Environment (#2409)

Michal Migurski notifications at github.com
Mon Dec 28 19:42:10 UTC 2020


@migurski commented on this pull request.



> @@ -0,0 +1,30 @@
+version: "3"
+
+services:
+  web:
+    build:
+      context: .
+    volumes:
+      - .:/app
+      # don't mount tmp directory (https://github.com/Shopify/bootsnap/issues/177)
+      - /app/tmp
+    ports:
+      - "3000:3000"
+    environment:
+      # https://github.com/Shopify/bootsnap/issues/262
+      ENABLE_BOOTSNAP: 'false'

Some details on why Bootsnap. Without these references in `docker-compose.yml`, we see this output:

```
+ docker-compose run --rm web bundle exec rake db:migrate
Starting openstreetmap-website_db_1 ... done
Errno::ENOENT: No such file or directory - bs_fetch:atomic_write_cache_file:chmod
/var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/compile_cache/iseq.rb:30:in `fetch'
/var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/compile_cache/iseq.rb:30:in `fetch'
/var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/compile_cache/iseq.rb:47:in `load_iseq'
/var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `block in require'
/var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:291:in `load_dependency'
/var/lib/gems/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `require'
/var/lib/gems/2.7.0/gems/bootstrap-4.5.3/lib/bootstrap.rb:61:in `register_rails_engine'
/var/lib/gems/2.7.0/gems/bootstrap-4.5.3/lib/bootstrap.rb:11:in `load!'
/var/lib/gems/2.7.0/gems/bootstrap-4.5.3/lib/bootstrap.rb:75:in `<main>'
/var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/lib/gems/2.7.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/var/lib/gems/2.7.0/gems/bundler-2.2.3/lib/bundler/runtime.rb:66:in `block (2 levels) in require'
/var/lib/gems/2.7.0/gems/bundler-2.2.3/lib/bundler/runtime.rb:61:in `each'
/var/lib/gems/2.7.0/gems/bundler-2.2.3/lib/bundler/runtime.rb:61:in `block in require'
/var/lib/gems/2.7.0/gems/bundler-2.2.3/lib/bundler/runtime.rb:50:in `each'
/var/lib/gems/2.7.0/gems/bundler-2.2.3/lib/bundler/runtime.rb:50:in `require'
/var/lib/gems/2.7.0/gems/bundler-2.2.3/lib/bundler.rb:174:in `require'
/app/config/application.rb:19:in `<top (required)>'
/app/rakefile:4:in `require_relative'
/app/rakefile:4:in `<top (required)>'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
(See full trace by running task with --trace)
```

With these lines included, `rake db:migrate` runs to completion.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2409#discussion_r549465197
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20201228/cb432c52/attachment-0001.htm>


More information about the rails-dev mailing list