-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimized Dockerfile for production #33
Conversation
Thanks @synhershko for this. I want to make sure I understand what is going on! So, by using the It seems like what we should be publishing to Docker hub is an image based on the Do you mind providing some steps on how to use this? |
Also, not quite sure why PhantomJS has been flaky on your PR's.. I created https://github.com/o19s/quepid/tree/pr/33 and tweaked the Also, do you think any of the changes you've made should be in Dockerfile.dev??? |
This PR uses Docker's multi-stage build (see https://docs.docker.com/develop/develop-images/multistage-build/), this helps keeps the container from bloating and also helps with CI and layer caching. Specifically, this was done based on the observation that
Correct. Just run Re PhantomJS - I believe it's only used for testing, I didn't see any usage of it anywhere else. No need for that in a prod container IMO, especially since it's a deprecated and dead project now. Re Dockerfile.dev - that'd really depend on your dev cycles, I don't have opinion on that :) internally we use same Dockerfile.prod but mount the code from the local folder. |
Thanks for the insight on phantomjs, yes we only use it for testing, and I didn't realize it was no longer used. Though changing the circle docker image to I am testing out the |
https://github.com/o19s/quepid/wiki/Installation-Guide is the partially completed page! |
I built off of the
|
docker-compose with local sql for local work, and deploying onto kubernetes. Both I believe are out of scope for this repo, as long as the container image is working and all env vars are properly documented. Re image sizes - it's most likely because of the framework install and all the required packages. I wouldn't spend time on this, but likely if you use alpine linux and install ruby and all the necessary requirements you can shave off another 1g from the image. |
@synhershko thank you for all the help. I’ve finally put together some “Production” install directions for Quepid: PR #36 is the work, and the associated directions are here: https://github.com/o19s/quepid/wiki/Installation-Guide. I've run through it manually twice now. Let know if you see any issues, and I'd like to merge and release 6.0.3 with the docker-compose deploy based upgrade process soon. |
@synhershko thank you for all your help, and getting this job done. I'd love your eyes on https://github.com/o19s/quepid/wiki/Installation-Guide and the related https://github.com/o19s/quepid/wiki/How-to-release-Quepid. I've just merged #36 which grew off this one, so closing this one now. Thank you! |
This PR brings a Dockerfile for creating an optimized container suitable for production, also speeds up the build by proper layering.
How Has This Been Tested?
By running it internally
Types of changes
Checklist: