mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-04 01:55:29 +02:00
Issue 631 run services with supervisor (#676)
* installed supervisor. Still need to set tasks to run in foreground. * setting programs to run in foreground * seems to work now * cleanup * final fixes * tests * show startup output on stdout * set Dovecot config files before starting it * make all processes log to console * Use the supervisor as the main process. The start-mailserver is started from the supervisord and then this process triggers others. Defined some default variable in the Dockerfile. In order for supervisored to build the command lines the ENV variable need to be set. Therefore the defaults are defined. Some processes are not single processes like postfix and fail2ban and they have a wrapper. The wrapper takes care of proper shutdown and checking if the process is running or not. Supervisored will restart the wrapping script if the process is gone. Increased some delays between tests because sometimes they where to short for all containers to be running. * Remove obsolete comments, reset timeout value to old one, added new lines * Add more time for analyzing the emails. Sometimes it fails the tests and gives a wrong state about the test. During testing 40 seconds was the safe value.
This commit is contained in:
parent
8b19d54218
commit
9e7959fafe
9 changed files with 336 additions and 48 deletions
14
Makefile
14
Makefile
|
@ -40,7 +40,7 @@ run:
|
|||
-v "`pwd`/test":/tmp/docker-mailserver-test \
|
||||
-v "`pwd`/test/config/letsencrypt":/etc/letsencrypt/live \
|
||||
-e ENABLE_POP3=1 \
|
||||
-e DMS_DEBUG=1 \
|
||||
-e DMS_DEBUG=0 \
|
||||
-e SSL_TYPE=letsencrypt \
|
||||
-h mail.my-domain.com -t $(NAME)
|
||||
sleep 15
|
||||
|
@ -49,6 +49,7 @@ run:
|
|||
-v "`pwd`/test":/tmp/docker-mailserver-test \
|
||||
-e SMTP_ONLY=1 \
|
||||
-e PERMIT_DOCKER=network \
|
||||
-e DMS_DEBUG=0 \
|
||||
-e OVERRIDE_HOSTNAME=mail.my-domain.com \
|
||||
-t $(NAME)
|
||||
sleep 15
|
||||
|
@ -63,6 +64,7 @@ run:
|
|||
-v "`pwd`/test/config":/tmp/docker-mailserver \
|
||||
-v "`pwd`/test":/tmp/docker-mailserver-test \
|
||||
-e PERMIT_DOCKER=network \
|
||||
-e DMS_DEBUG=0 \
|
||||
-e OVERRIDE_HOSTNAME=mail.my-domain.com \
|
||||
-h mail.my-domain.com \
|
||||
-t $(NAME)
|
||||
|
@ -79,6 +81,7 @@ run:
|
|||
-v "`pwd`/test":/tmp/docker-mailserver-test \
|
||||
-e ENABLE_FETCHMAIL=1 \
|
||||
--cap-add=NET_ADMIN \
|
||||
-e DMS_DEBUG=0 \
|
||||
-h mail.my-domain.com -t $(NAME)
|
||||
sleep 15
|
||||
docker run -d --name mail_disabled_clamav_spamassassin \
|
||||
|
@ -86,6 +89,7 @@ run:
|
|||
-v "`pwd`/test":/tmp/docker-mailserver-test \
|
||||
-e ENABLE_CLAMAV=0 \
|
||||
-e ENABLE_SPAMASSASSIN=0 \
|
||||
-e DMS_DEBUG=0 \
|
||||
-h mail.my-domain.com -t $(NAME)
|
||||
sleep 15
|
||||
docker run -d --name mail_manual_ssl \
|
||||
|
@ -94,6 +98,7 @@ run:
|
|||
-e SSL_TYPE=manual \
|
||||
-e SSL_CERT_PATH=/tmp/docker-mailserver/letsencrypt/mail.my-domain.com/fullchain.pem \
|
||||
-e SSL_KEY_PATH=/tmp/docker-mailserver/letsencrypt/mail.my-domain.com/privkey.pem \
|
||||
-e DMS_DEBUG=0 \
|
||||
-h mail.my-domain.com -t $(NAME)
|
||||
sleep 15
|
||||
docker run -d --name ldap_for_mail \
|
||||
|
@ -120,6 +125,7 @@ run:
|
|||
-e SASLAUTHD_LDAP_PASSWORD=admin \
|
||||
-e SASLAUTHD_LDAP_SEARCH_BASE=ou=people,dc=localhost,dc=localdomain \
|
||||
-e POSTMASTER_ADDRESS=postmaster@localhost.localdomain \
|
||||
-e DMS_DEBUG=0 \
|
||||
--link ldap_for_mail:ldap \
|
||||
-h mail.my-domain.com -t $(NAME)
|
||||
sleep 15
|
||||
|
@ -130,8 +136,8 @@ run:
|
|||
-e SASLAUTHD_MECHANISMS=rimap \
|
||||
-e SASLAUTHD_MECH_OPTIONS=127.0.0.1 \
|
||||
-e POSTMASTER_ADDRESS=postmaster@localhost.localdomain \
|
||||
-e DMS_DEBUG=0 \
|
||||
-h mail.my-domain.com -t $(NAME)
|
||||
# Wait for containers to fully start
|
||||
sleep 15
|
||||
docker run -d --name mail_lmtp_ip \
|
||||
-v "`pwd`/test/config":/tmp/docker-mailserver \
|
||||
|
@ -139,6 +145,7 @@ run:
|
|||
-v "`pwd`/test":/tmp/docker-mailserver-test \
|
||||
-e ENABLE_POSTFIX_VIRTUAL_TRANSPORT=1 \
|
||||
-e POSTFIX_DAGENT=lmtp:127.0.0.1:24 \
|
||||
-e DMS_DEBUG=0 \
|
||||
-h mail.my-domain.com -t $(NAME)
|
||||
sleep 30
|
||||
docker run -d --name mail_with_postgrey \
|
||||
|
@ -148,6 +155,7 @@ run:
|
|||
-e POSTGREY_DELAY=15 \
|
||||
-e POSTGREY_MAX_AGE=35 \
|
||||
-e POSTGREY_TEXT="Delayed by postgrey" \
|
||||
-e DMS_DEBUG=0 \
|
||||
-h mail.my-domain.com -t $(NAME)
|
||||
sleep 20
|
||||
|
||||
|
@ -179,7 +187,7 @@ fixtures:
|
|||
|
||||
docker exec mail_override_hostname /bin/sh -c "nc 0.0.0.0 25 < /tmp/docker-mailserver-test/email-templates/existing-user1.txt"
|
||||
# Wait for mails to be analyzed
|
||||
sleep 20
|
||||
sleep 40
|
||||
|
||||
tests:
|
||||
# Start tests
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue