Merge pull request #15190 from FHenry/dev_finaly_maildev_in_docker

new maildev work in docker compose
This commit is contained in:
Laurent Destailleur 2020-10-28 17:13:01 +01:00 committed by GitHub
commit b23a4e1025
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 4 deletions

View File

@ -20,6 +20,9 @@ RUN apt-get update -y \
unzip \ unzip \
curl \ curl \
apt-utils \ apt-utils \
msmtp \
msmtp-mta \
mailutils \
&& apt-get autoremove -y \ && apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ && 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.remote_connect_back=1' >> ${PHP_INI_DIR}/php.ini
RUN echo 'xdebug.profiler_enable=0' >> ${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 '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 EXPOSE 80

View File

@ -16,7 +16,7 @@ And then, you can run :
docker-compose up docker-compose up
This will run 3 container Docker : Dolibarr, MariaDB and PhpMyAdmin. This will run 4 containers Docker : Dolibarr, MariaDB, PhpMyAdmin and MailDev.
The URL to go to the Dolibarr is : The URL to go to the Dolibarr is :
@ -25,7 +25,10 @@ The URL to go to the Dolibarr is :
The URL to go to PhpMyAdmin is (login/password is root/root) : The URL to go to PhpMyAdmin is (login/password is root/root) :
http://0.0.0.0:8080 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 http://0.0.0.0:8081
b (name of the database container) as database host.
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 Setup documents folder, during the installation process, to /var/documents

View File

@ -52,3 +52,6 @@ services:
ports: ports:
- "8081:80" - "8081:80"
- "25:25" - "25:25"
networks:
- internal-pod
- external-pod