-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcompose.yaml
More file actions
83 lines (81 loc) · 2.03 KB
/
Copy pathcompose.yaml
File metadata and controls
83 lines (81 loc) · 2.03 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
services:
postgres:
image: postgres:16
restart: unless-stopped
environment:
POSTGRES_DB: openmailserver
POSTGRES_USER: openmailserver
POSTGRES_PASSWORD: openmailserver
ports:
- "5432:5432"
volumes:
- ./data/postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U openmailserver -d openmailserver"]
interval: 5s
timeout: 5s
retries: 10
api:
build:
context: .
dockerfile: Dockerfile
command:
[
"uvicorn",
"openmailserver.app:app",
"--host",
"0.0.0.0",
"--port",
"${OPENMAILSERVER_PORT:-8787}",
]
env_file:
- .env
environment:
OPENMAILSERVER_DATABASE_URL: postgresql+psycopg://openmailserver:openmailserver@postgres:5432/openmailserver
OPENMAILSERVER_FALLBACK_DATABASE_URL: sqlite+pysqlite:///./data/openmailserver.sqlite3
OPENMAILSERVER_HOST: 0.0.0.0
volumes:
- ./data:/app/data
- ./logs:/app/logs
- ./runtime:/app/runtime
ports:
- "${OPENMAILSERVER_API_BIND:-8787}:${OPENMAILSERVER_PORT:-8787}"
depends_on:
postgres:
condition: service_healthy
mox:
condition: service_started
mox:
image: r.xmox.nl/mox:latest
restart: unless-stopped
working_dir: /mox
environment:
MOX_DOCKER: "yes"
command:
- /bin/sh
- -lc
- >
if [ ! -f /mox/config/mox.conf ]; then
echo "Run openmailserver mox-quickstart";
exit 1;
fi;
exec mox serve
env_file:
- .env
volumes:
- ./runtime/mox/config:/mox/config
- ./runtime/mox/data:/mox/data
- ./runtime/mox/web:/mox/web
ports:
- "25:25"
- "465:465"
- "587:587"
- "143:143"
- "993:993"
- "${OPENMAILSERVER_MOX_HTTP_BIND:-80}:80"
- "${OPENMAILSERVER_MOX_HTTPS_BIND:-443}:443"
healthcheck:
test: ["CMD-SHELL", "test -f /mox/config/mox.conf"]
interval: 5s
timeout: 5s
retries: 10