mquery
mquery copied to clipboard
Make Dockerfiles more cacheable
Right now, any change in (for example) react frontend will rebuild:
- dev-frontend from dev dockerfile (correctly, expected behaviour)
- web (expected, but should only rebuild the frontend, not everything)
- daemon (unnecessary)
- dev-web (unnecessary)
Right now we recommend docker-compose for development. We should strive to make rebuilds a faster operation.
I think we could:
- move
mqueryfrontto a separate directory, instead of it being a subdirectory of./src/ - investigate npm caching in mqueryfront (I think it should be doable? Just copy package.json and install first?)
Alternatively/additionally, we may consider uploading prebuild images artifacts to dockerhub? So instead of building them locally, we can download them instead. Just a thought.