Skip to content

Instantly share code, notes, and snippets.

@kevinrobinson
Last active November 20, 2015 23:21
Show Gist options
  • Save kevinrobinson/d46bde38b5a37fd7e574 to your computer and use it in GitHub Desktop.
Save kevinrobinson/d46bde38b5a37fd7e574 to your computer and use it in GitHub Desktop.
# Asset compilation works by having the webpack container continually build an artifact,
# and that artifact being mounted for Rails to serve statically.
webpack:
build: webpack/.
command: npm run watch
volumes:
- ./webpack/config:/mnt/webpack/config
- ./webpack/src:/mnt/webpack/src
- ./volumes/webpack_build:/mnt/build
# ...
rails:
build: rails/
working_dir: /mnt/rails
volumes:
- ./rails:/mnt/rails
- ./volumes/webpack_build:/mnt/rails/public/webpack_build
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment