Closed trioletas closed 7 years ago
Thanks for looking at the prod image. imma look in to pm2 integration for prod as well - wonder if it makes sense to use it in a container environment.
Added the multi stage built support, pm2 shelved for now, will work on dev mode.
@trioletas does adding multi stage builds reduce the size in this particular case?
Multi step builds serve the purpose of simplifying the dockerfile structure by making the usual clean up after yourself routine unnecessary. You can definitely get the same image size without them, but it's not as future proof to do the manual clean up.
There was a bug in the non-multistage implementation with original node modules folder with all dev dependencies being present in the final image. I've decided to go with this approach to avoid these sort of mishaps with a more maintainable structure
Dev mode is now properly supported with dedicated Dockerfile and docker-compose. Compilation and linting runs in the container, source code directory is attached as a volume mount. I don't see a way how to reuse the productive Dockerfile at the moment. Tested in OS X native and windows docker toolbox, looking for volunteers to test other setups as well.
@aeldar would be nice if you could assist us by testing the development set up on Linux machine, I remember that you have one available.
docker-compose up
thanks in advance!
@trioletas works for me. Checked on the following configuration:
Changes in the source files were reflected in a container runtime.
Thanks a lot Eldar !
👷 Work in progress: