ChurchCRM / Docker

Docker Setup of Church CRM
0 stars 20 forks source link

More containers, less processes in each #12

Closed ajcollett closed 6 years ago

ajcollett commented 6 years ago

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

ajcollett commented 6 years ago

@jaskipper @DawoudIO thoughts?

crossan007 commented 6 years ago

What would you propose? a single image for DB and a separate image for Web?

ajcollett commented 6 years ago

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.

ajcollett commented 6 years ago

This answer is a lot more practical: https://devops.stackexchange.com/a/1897

jaskipper commented 6 years ago

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.

ajcollett commented 6 years ago

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.

ajcollett commented 6 years ago

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.