2020-06-30 00:49:52 +08:00
|
|
|
version: '3.7'
|
2019-02-19 17:49:55 +08:00
|
|
|
services:
|
|
|
|
postfix_test_587:
|
|
|
|
hostname: "postfix"
|
|
|
|
image: "boky/postfix"
|
2020-06-30 00:49:52 +08:00
|
|
|
build:
|
2020-07-01 19:50:08 +08:00
|
|
|
context: ../..
|
2019-02-19 17:49:55 +08:00
|
|
|
restart: always
|
|
|
|
healthcheck:
|
|
|
|
test: [ "CMD", "sh", "-c", "netstat -an | fgrep 587 | fgrep -q LISTEN" ]
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
start_period: 10s
|
|
|
|
retries: 2
|
|
|
|
volumes:
|
|
|
|
- "./test-keys:/etc/opendkim/keys"
|
2020-06-30 00:49:52 +08:00
|
|
|
- "./docker-init.db:/docker-init.db/"
|
2019-02-19 17:49:55 +08:00
|
|
|
environment:
|
2020-07-03 13:08:27 +08:00
|
|
|
FORCE_COLOR: "1"
|
2019-02-19 17:49:55 +08:00
|
|
|
ALLOWED_SENDER_DOMAINS: "example.org"
|
2020-06-30 00:49:52 +08:00
|
|
|
tests:
|
|
|
|
image: "boky/postfix-integration-test"
|
|
|
|
restart: "no"
|
|
|
|
volumes:
|
2020-07-01 19:50:08 +08:00
|
|
|
- "../tester:/code"
|
2020-06-30 00:49:52 +08:00
|
|
|
build:
|
2020-07-01 19:50:08 +08:00
|
|
|
context: ../tester
|
2020-10-24 21:52:15 +08:00
|
|
|
command: "/" # relative path to /code
|
2020-07-01 20:12:04 +08:00
|
|
|
environment:
|
|
|
|
FROM: "demo@example.org"
|
|
|
|
TO: "test@gmail.com"
|