The idea of “Development/Production parity” confuses many on this front. This doesn’t mean that you can simply have a single configuration and it will work across everything; it means you’ll have much closer parity and that you can create an environment that resembles something very close to what you’ll have in production.
What’s wrong here is that currently you’re building your image and it would be ready to ship out, it’d have your code, you have volumes set aside for uploads, etc. Awesome!
Unfortunately, this setup is not correct for development. If you want to be editing code on the fly – you need to attach your local working directory to the image as a volume as well. This would not be done in production; so it’s very close – but not exactly the same setup.
Add the following in to the app
service volumes section of your compose-file and you should be good to go:
- .:/app