From e4dfed53c2857ddf8cd260b3fbc0ec40f105ba65 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 27 Oct 2020 22:42:48 +0100 Subject: [PATCH] new maildev work in docker compose --- build/docker/Dockerfile | 15 ++++++++++++++- build/docker/README.md | 7 +++++-- build/docker/docker-compose.yml | 3 +++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile index 2be287c2db9..dca74e9e720 100644 --- a/build/docker/Dockerfile +++ b/build/docker/Dockerfile @@ -20,6 +20,9 @@ RUN apt-get update -y \ unzip \ curl \ apt-utils \ + msmtp \ + msmtp-mta \ + mailutils \ && apt-get autoremove -y \ && rm -rf /var/lib/apt/lists/* \ && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ @@ -44,7 +47,17 @@ RUN echo 'xdebug.remote_port=9000' >> ${PHP_INI_DIR}/php.ini RUN echo 'xdebug.remote_connect_back=1' >> ${PHP_INI_DIR}/php.ini RUN echo 'xdebug.profiler_enable=0' >> ${PHP_INI_DIR}/php.ini RUN echo 'xdebug.remote_log="/tmp/xdebug.log"' >> ${PHP_INI_DIR}/php.ini -#RUN echo '172.17.0.1 docker.host' >> /etc/hosts +#RUN echo 'localhost docker.host' >> /etc/hosts + +# set up sendmail config, to use maildev +RUN echo "account default" > /etc/msmtprc +RUN echo "auth off" >> /etc/msmtprc +RUN echo "port 25" >> /etc/msmtprc +RUN echo "host mail" >> /etc/msmtprc +RUN echo "from local@localdomain.com" >> /etc/msmtprc +RUN echo "domain localhost.localdomain" >> /etc/msmtprc +RUN echo "sendmail_path=/usr/bin/msmtp -t" >> /usr/local/etc/php/conf.d/php-sendmail.ini +RUN echo "localhost localhost.localdomain" >> /etc/hosts EXPOSE 80 diff --git a/build/docker/README.md b/build/docker/README.md index 2fd278a531f..b7e0045055a 100644 --- a/build/docker/README.md +++ b/build/docker/README.md @@ -25,7 +25,10 @@ The URL to go to the Dolibarr is : The URL to go to PhpMyAdmin is (login/password is root/root) : http://0.0.0.0:8080 + +In Dolibarr configuration Email let PHP mail function, To see all mail send by Dolibarr go to maildev -Setup the database connection during the installation process, please use mariad -b (name of the database container) as database host. + http://0.0.0.0:8081 + +Setup the database connection during the installation process, please use mariadb (name of the database container) as database host. Setup documents folder, during the installation process, to /var/documents diff --git a/build/docker/docker-compose.yml b/build/docker/docker-compose.yml index 7e4ceda902e..2167f069f25 100644 --- a/build/docker/docker-compose.yml +++ b/build/docker/docker-compose.yml @@ -52,3 +52,6 @@ services: ports: - "8081:80" - "25:25" + networks: + - internal-pod + - external-pod