Closed ajcollett closed 6 years ago
@jaskipper @DawoudIO thoughts?
What would you propose? a single image for DB and a separate image for Web?
So, as far as I can see, there are 3 processes here (but i will have a closed look at the branch), web, php and DB. Each should have it's own container.
Here is a good overview of the idea: https://devops.stackexchange.com/a/451
The images can be based off the main Alpine image, and not reply on intermediary builds. I will see if I can modify what you have done to give a working example, and I can then comment better after having a look at the particular needs of ChurchCRM.
This answer is a lot more practical: https://devops.stackexchange.com/a/1897
I moved back to two containers in the latest push of the new branch. DB and Apache/PHP/ChurchCRM. I had ChurchCRM in a separate container, but there was no process being run there. They are just static files (php/js/etc.). I was having issues with the third container holding ChurchCRM. I had to use a volume to share those files w/ Apache/PHP, and quite often in creating the build from scratch, ChurchCRM wouldn't populate correctly in the volume. Being that it isn't actually running any processes, I decided to bring it all together. It's not possible, from what I can tell, to separate Apache and PHP.
Ah. Your using php through an apache mod right?
Okay. In that case, one container for Apache and PHP makes sense.
Sorry, I keep hitting ctrl-enter.
Will reply in a new comment.
I agree 100% to not have the static files in a separate container. Apologies if I mislead you in that direction.
I myself have worked mostly with nginx and php-fpm. Which you can then separate into 2 containers. I do not propose a switch though, unless there is ever actually a need, which I also don't foresee happening.
I think this particular issue can be closed then.
Just a talking point, it might be good to break the containers up to single process docker images.
This way the most simple configuration - closest to the "official images" - can be used.
@jaskipper