-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathdocker-compose.mailcrypt-test.yml
More file actions
55 lines (51 loc) · 1.48 KB
/
docker-compose.mailcrypt-test.yml
File metadata and controls
55 lines (51 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
# Minimal compose file for mailcrypt integration tests.
# Starts only dovecot, a mock Userli API, and a tools container.
#
# Usage:
# docker compose -f docker-compose.mailcrypt-test.yml up -d
# bash tests/mailcrypt_integration.sh
# docker compose -f docker-compose.mailcrypt-test.yml down -v
services:
dovecot:
depends_on:
mock-api:
condition: service_healthy
image: dovecot/dovecot:latest
environment:
MAIL_CRYPT: 2
USERLI_HOST: mock-api
USERLI_API_ACCESS_TOKEN: 727eb7d3ad310bc510f5fa17c223572c
DOVECOT_LUA_INSECURE: "true"
ports:
- "1143:31143"
volumes:
- vmail:/srv/vmail
- ./docker/dovecot/dovecot.conf:/etc/dovecot/dovecot.conf:ro
- ./docker/dovecot/conf.d:/etc/dovecot/conf.d:ro
- ./contrib/userli-dovecot-adapter.lua:/usr/local/bin/userli-dovecot-adapter.lua:ro
mock-api:
image: docker.io/python:3-alpine
working_dir: /app
command: python dovecot-api-mock.py 80
volumes:
- ./tests/dovecot-api-mock.py:/app/dovecot-api-mock.py:ro
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import urllib.request as u; u.urlopen(u.Request('http://localhost/api/dovecot/status', headers={'Authorization': 'Bearer 727eb7d3ad310bc510f5fa17c223572c'}))",
]
interval: 2s
timeout: 3s
retries: 5
tools:
image: busybox:stable
profiles:
- tools
volumes:
- vmail:/srv/vmail:ro
volumes:
vmail: