mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
This commit is contained in:
parent
351c9c80a8
commit
cc56b4f89e
|
@ -219,6 +219,6 @@ COPY target/supervisor/conf.d/* /etc/supervisor/conf.d/
|
||||||
|
|
||||||
EXPOSE 25 587 143 465 993 110 995 4190
|
EXPOSE 25 587 143 465 993 110 995 4190
|
||||||
|
|
||||||
CMD supervisord -c /etc/supervisor/supervisord.conf
|
CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]
|
||||||
|
|
||||||
ADD target/filebeat.yml.tmpl /etc/filebeat/filebeat.yml.tmpl
|
ADD target/filebeat.yml.tmpl /etc/filebeat/filebeat.yml.tmpl
|
||||||
|
|
2
setup.sh
2
setup.sh
|
@ -7,7 +7,7 @@
|
||||||
INFO=$(docker ps \
|
INFO=$(docker ps \
|
||||||
--no-trunc \
|
--no-trunc \
|
||||||
--format="{{.Image}}\t{{.Names}}\t{{.Command}}" | \
|
--format="{{.Image}}\t{{.Names}}\t{{.Command}}" | \
|
||||||
grep "/bin/sh -c 'supervisord -c /etc/supervisor/supervisord.conf'")
|
grep "supervisord -c /etc/supervisor/supervisord.conf")
|
||||||
|
|
||||||
IMAGE_NAME=$(echo $INFO | awk '{print $1}')
|
IMAGE_NAME=$(echo $INFO | awk '{print $1}')
|
||||||
CONTAINER_NAME=$(echo $INFO | awk '{print $2}')
|
CONTAINER_NAME=$(echo $INFO | awk '{print $2}')
|
||||||
|
|
|
@ -389,7 +389,7 @@ function _check_hostname() {
|
||||||
|
|
||||||
if ( ! echo $HOSTNAME | grep -E '^(\S+[.]\S+)$' > /dev/null ); then
|
if ( ! echo $HOSTNAME | grep -E '^(\S+[.]\S+)$' > /dev/null ); then
|
||||||
notify 'err' "Setting hostname/domainname is required"
|
notify 'err' "Setting hostname/domainname is required"
|
||||||
kill -6 `cat /var/run/supervisord.pid` && return 1
|
kill `cat /var/run/supervisord.pid` && return 1
|
||||||
else
|
else
|
||||||
notify 'inf' "Domain has been set to $DOMAINNAME"
|
notify 'inf' "Domain has been set to $DOMAINNAME"
|
||||||
notify 'inf' "Hostname has been set to $HOSTNAME"
|
notify 'inf' "Hostname has been set to $HOSTNAME"
|
||||||
|
|
|
@ -6,7 +6,7 @@ load 'test_helper/bats-assert/load'
|
||||||
|
|
||||||
@test "checking configuration: hostname/domainname" {
|
@test "checking configuration: hostname/domainname" {
|
||||||
run docker run `docker inspect --format '{{ .Config.Image }}' mail`
|
run docker run `docker inspect --format '{{ .Config.Image }}' mail`
|
||||||
assert_failure
|
assert_success
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "checking configuration: hostname/domainname override" {
|
@test "checking configuration: hostname/domainname override" {
|
||||||
|
@ -1785,3 +1785,12 @@ load 'test_helper/bats-assert/load'
|
||||||
run docker exec mail grep "Subject: Root Test Message" /var/mail/localhost.localdomain/user1/new/ -R
|
run docker exec mail grep "Subject: Root Test Message" /var/mail/localhost.localdomain/user1/new/ -R
|
||||||
assert_success
|
assert_success
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# clean exit
|
||||||
|
#
|
||||||
|
|
||||||
|
@test "checking that the container stops cleanly" {
|
||||||
|
run docker stop -t 60 mail
|
||||||
|
assert_success
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue