Crivaledaz / Mattermost-LDAP

This module provides an external LDAP authentication in Mattermost for the Team Edition (free).
MIT License
359 stars 71 forks source link

Docker infrastructure #28

Closed colinleroy closed 4 years ago

colinleroy commented 5 years ago

Hello there,

I've put in a bit of work to containerize Mattermost-LDAP and deploy it easily. If you like it, you're very welcome to merge !

quadriq commented 5 years ago

great work.

just adjust the Dockerfile, because your "entrypoing" not always work.

FROM debian:stretch

RUN apt-get update && \
        apt-get -y -o Dpkg::Options::="--force-confold" install sudo nginx-light php-fpm postgresql-client postgresql php-ldap php-pdo php-pgsql git runit daemontools && \
        sed -i "s/^session.gc_maxlifetime.*/session.gc_maxlifetime = 60/" /etc/php/7.0/fpm/php.ini

COPY oauth/ /var/www/html/oauth
COPY images/ /var/www/html/images

COPY init_postgres.sh /
COPY files/ /

ENTRYPOINT ["/entrypoint.sh"]
CMD ['run']
t1k3 commented 4 years ago

@Crivaledaz What do you think about this solution?

Crivaledaz commented 4 years ago

I finally found some time to review these changes, and I see a lot of good work has been done by @colinleroy.

Actually, I had worked on Mattermost-LDAP containerization and Kubernetization (via Helm) since 2018 in my company, and I submit my work as soon as I had found time to document it. This was last year, and I had no time to make a docker-compose or to merge our two implementations and of course I am more comfortable to maintain my work. You can found this docker implementation in the Docker folder from Mattermost-LDAP V1.

Recently, with the lockdown, I worked again on Mattermost-LDAP containerization to simplify deployment. I have abandoned my first docker implementation for a lightest and more easy to use implementation. This new implementation is more complete and uses docker-compose to orchestrate Mattermost-LDAP with Mattermost for test purpose. This should also simplify maintainability and development of Mattermost-LDAP.

You can find this new implementation with docker-compose in the Mattermost-LDAP V2 available in beta on branch v2.

In this new version, I have integrated some changes picked from this PR and other forks from my project. So, unfortunately, I will not merge this PR, because there is a gap between V2 implementation and @colinleroy implementation.

I am very sorry for this decision, which does not call into questions the quality of your work. I sincerely appreciate your contribution and your help on this project. I am convinced my implementation can be improved, so feel free to modify it and push your suggestion.

My next work is to adapt my Helm module with Mattermost-LDAP V2 and documents it, in order to submit the chart here.

I let this PR open for the moment, because your docker implementation could interest some people.

Regards,

colinleroy commented 4 years ago

Hi Denis, Thanks for your detailed explanation, and don't feel bad about not merging! I'm happy you could use some of my work anyway :)

I only opened that PR because I had to do it to fulfill a need at my previous work and wanted to share, in case it would be useful and because that's how free software should work ; not to push your project in any direction :)

Cheers, Colin