zammad / zammad-docker-compose

Zammad Docker images for docker-compose
https://hub.docker.com/r/zammad/zammad-docker-compose/
GNU Affero General Public License v3.0
273 stars 223 forks source link

feature request - single docker image #405

Closed epsi1on closed 6 months ago

epsi1on commented 6 months ago

Hi there. Most of other web apps, like WordPress, Drupal, OsTicket etc have a single image on the docker. The docker compose file for Zammad is kind of complex to me. Memcached and Redis are both used. There are currently 10 services in the compose.yml file for this project, this is dependency chart:

graph TD;
    zammad-backup-->zammad-railsserver;
    zammad-backup-->zammad-postgresql;
    zammad-elasticsearch;
    zammad-init-->zammad-postgresql;
zammad-memcached;
zammad-nginx;
zammad-postgresql;
 zammad-railsserver;
zammad-redis;
 zammad-scheduler;
zammad-websocket

For example, drupal docker compose file would be something simple as this:

  drupal:
    container_name: "drupal"
   ... blah

  db:
    image: mariadb:10.6.4-focal
       ... blah

the drupal docker image have web server (nginx or apache) integrated with it. Is it possible for you guys, to make a single docker image for the whole zammad (including rail and nginx with)? hopefully some compose file like one for Drupal will be needed to run zammad via docker compose.

Thanks

mgruner commented 6 months ago

Short answer: no, this is not possible for us.

waja commented 6 months ago

Short answer: no, this is not possible for us.

It makes technical no sense to run monolithic, fat containers in most cases. Yes, gitlab is doing so for example, but it's the cause they just put their omnibus (Debian)-Package into a Debian Container and some glue around. (This is not judging, just a way to deal with existing solution and putting it into a container image.)

epsi1on commented 6 months ago

It makes technical no sense to run monolithic, fat containers in most cases.

I do understand that having single docker image is not what is going to be done, i do not expect it anymore. About fat containers, just think about a case which a user want to have 3 apps like Zammad, there will be 3*10= 30 services in the compose.yml. I think leading and maintaining this 30 service orchestration would be pain. I'm talking about maintenance.

Thanks for quality work anyways. Cheers

waja commented 6 months ago

I'm talking about maintenance.

same, but on developers side. Imagine you have not to be responsible just for the zammad, but also elasticsearch, nginx and all that stuff. With this multi container construct this work is done by other ppl (which has more experiance in maintaining this specific software).

mdoerfel commented 6 months ago

I'm talking about maintenance.

I would like to second @waja from an admin's perspective: To my experience, a docker-compose.yml listing one (okay, some) application specific container and several small standard images (e.g. redis, postgresql, nginx) can be maintained much better. Especially updates of the standard images due to security patches are faster than waiting for the maintainer to release an updated monolithic image.

And why do you want to put 3 different applications into a single docker stack? Separating them into 3 different docker-compose.yml files (in 3 different directories) is quite simple. And it isolates the internal network of each application from the others. Or do you plan to access application A1's database (or redis or memcached, think of authentication cookies!) to be accessible from the (eventually hacked) application A2 container? I think, it is better to stop lateral movement of intruders as early as possible.

epsi1on commented 6 months ago

And it isolates the internal network of each application from the others.

Thanks for information, but it didn't. In my last try, only one network with name {project}_default where created for all docker compose files. so i think all containers (including containers from other docker compose files) are using same shared network.

mdoerfel commented 6 months ago

As I said, you have to create 3 different docker stack in 3 different directories: projectA/docker-compose.yml, projectB/docker-compose.yml, and projectC/docker-compose.yml. Then you will have 3 default networks named projectA_default, projectB_default, and projectC_default.