-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (44 loc) · 1.4 KB
/
docker-compose.yml
File metadata and controls
46 lines (44 loc) · 1.4 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
services:
db:
image: postgres:16-alpine
environment:
- POSTGRES_DB=mailserver
- POSTGRES_USER=mailserver
- POSTGRES_PASSWORD=mailserver
volumes:
- maildb:/var/lib/postgresql/data
restart: unless-stopped
mailserver:
image: ghcr.io/tayyebi/mailserver:main
build: .
env_file: .env
depends_on:
- db
ports:
- "${SMTP_PORT:-25}:25"
- "${SUBMISSION_PORT:-587}:587"
- "${SMTPS_PORT:-465}:465"
- "${SMTP_ALT_PORT:-2525}:2525"
- "${IMAP_PORT:-143}:143"
- "${IMAPS_PORT:-993}:993"
- "${POP3_PORT:-110}:110"
- "${POP3S_PORT:-995}:995"
- "${HTTP_PORT:-8080}:${HTTP_PORT:-8080}"
volumes:
- maildata:/data
# Optional: mount Docker socket to enable "Restart Container" from the admin UI.
# WARNING: This grants the container full access to the Docker daemon.
# Remove this line if you do not need container restart functionality.
- /var/run/docker.sock:/var/run/docker.sock
environment:
- HOSTNAME=${HOSTNAME:-mail.example.com}
- ADMIN_PORT=${HTTP_PORT:-8080}
- DATABASE_URL=postgres://mailserver:mailserver@db/mailserver
- PIXEL_BASE_URL=http://${HOSTNAME:-mail.example.com}:${HTTP_PORT:-8080}/pixel?id=
- SEED_USER=${SEED_USER:-admin}
- SEED_PASS=${SEED_PASS:-admin}
- TZ=${TZ:-UTC}
restart: unless-stopped
volumes:
maildata:
maildb: