2020-12-05 12:48:09 +01:00
|
|
|
---
|
2023-05-27 13:09:23 +02:00
|
|
|
version: '3.9'
|
2020-07-14 11:07:33 +02:00
|
|
|
services:
|
|
|
|
mail:
|
2024-06-01 14:39:22 +02:00
|
|
|
image: mailserver/docker-mailserver:13.3.1
|
2020-07-14 11:07:33 +02:00
|
|
|
hostname: ${HOSTNAME}
|
|
|
|
domainname: ${DOMAINNAME}
|
|
|
|
container_name: ${CONTAINER_NAME}
|
2023-05-27 13:09:23 +02:00
|
|
|
restart: unless-stopped
|
|
|
|
stop_grace_period: 2m30s # Avoid data loss
|
2020-07-14 11:07:33 +02:00
|
|
|
ports:
|
|
|
|
- "25:25"
|
|
|
|
- "143:143"
|
|
|
|
- "587:587"
|
|
|
|
- "993:993"
|
2023-05-27 13:09:23 +02:00
|
|
|
# - "127.0.0.1:1134:1134" # Only useful once we enable RSPAMD
|
2020-07-14 11:07:33 +02:00
|
|
|
volumes:
|
|
|
|
- maildata:/var/mail
|
|
|
|
- mailstate:/var/mail-state
|
|
|
|
- maillogs:/var/log/mail
|
|
|
|
- ./config/:/tmp/docker-mailserver/
|
|
|
|
- nginx_cert:/etc/letsencrypt/live/mail.poldebra.me
|
|
|
|
env_file:
|
|
|
|
- .env
|
|
|
|
- env-mailserver
|
|
|
|
cap_add:
|
|
|
|
- NET_ADMIN
|
|
|
|
- SYS_PTRACE
|
2020-07-14 11:55:23 +02:00
|
|
|
networks:
|
|
|
|
- internal
|
2023-05-27 13:09:23 +02:00
|
|
|
logging:
|
|
|
|
driver: "json-file"
|
|
|
|
options:
|
|
|
|
max-size: "10m"
|
|
|
|
max-file: "3"
|
2020-07-14 11:55:23 +02:00
|
|
|
|
|
|
|
roundcubedb:
|
|
|
|
image: postgres:9.6-alpine
|
2023-05-27 13:09:23 +02:00
|
|
|
restart: unless-stopped
|
2020-07-14 11:55:23 +02:00
|
|
|
env_file:
|
|
|
|
- .env
|
|
|
|
- env-roundcube
|
2020-07-14 15:21:31 +02:00
|
|
|
volumes:
|
|
|
|
- rb_db:/var/lib/postgresql/data/
|
2020-07-14 11:55:23 +02:00
|
|
|
networks:
|
|
|
|
- internal
|
2023-05-27 13:09:23 +02:00
|
|
|
logging:
|
|
|
|
driver: "json-file"
|
|
|
|
options:
|
|
|
|
max-size: "5m"
|
|
|
|
max-file: "3"
|
2020-07-14 11:55:23 +02:00
|
|
|
|
|
|
|
roundcube:
|
2022-11-27 18:22:00 +01:00
|
|
|
image: roundcube/roundcubemail:1.6.x-apache
|
2023-05-27 13:09:23 +02:00
|
|
|
restart: unless-stopped
|
2020-07-14 11:55:23 +02:00
|
|
|
depends_on:
|
|
|
|
- mail
|
|
|
|
- roundcubedb
|
|
|
|
env_file:
|
|
|
|
- .env
|
|
|
|
- env-roundcube
|
2020-07-14 15:21:31 +02:00
|
|
|
volumes:
|
|
|
|
- rb_config:/var/roundcube/config/
|
2020-07-14 11:55:23 +02:00
|
|
|
networks:
|
|
|
|
- proxy
|
|
|
|
- internal
|
2023-05-27 13:09:23 +02:00
|
|
|
logging:
|
|
|
|
driver: "json-file"
|
|
|
|
options:
|
|
|
|
max-size: "10m"
|
|
|
|
max-file: "3"
|
2020-07-14 11:07:33 +02:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
maildata:
|
|
|
|
driver: local
|
|
|
|
driver_opts:
|
|
|
|
type: none
|
|
|
|
o: bind
|
|
|
|
device: "/srv/docker/mail/data"
|
|
|
|
mailstate:
|
|
|
|
driver: local
|
|
|
|
driver_opts:
|
|
|
|
type: none
|
|
|
|
o: bind
|
|
|
|
device: "/srv/docker/mail/state"
|
|
|
|
maillogs:
|
|
|
|
driver: local
|
|
|
|
driver_opts:
|
|
|
|
type: none
|
|
|
|
o: bind
|
|
|
|
device: "/srv/docker/mail/logs"
|
2020-07-14 15:21:31 +02:00
|
|
|
rb_config:
|
|
|
|
driver: local
|
|
|
|
driver_opts:
|
|
|
|
type: none
|
|
|
|
o: bind
|
|
|
|
device: "/srv/docker/mail/roundcube-config"
|
|
|
|
rb_db:
|
|
|
|
driver: local
|
|
|
|
driver_opts:
|
|
|
|
type: none
|
|
|
|
o: bind
|
|
|
|
device: "/srv/docker/mail/roundcube-db"
|
2020-07-14 11:07:33 +02:00
|
|
|
nginx_cert:
|
|
|
|
driver: local
|
|
|
|
driver_opts:
|
|
|
|
type: none
|
|
|
|
o: bind
|
|
|
|
device: "/srv/docker/reverse_proxy/certs/mail.poldebra.me"
|
2020-07-14 11:55:23 +02:00
|
|
|
|
|
|
|
networks:
|
|
|
|
proxy:
|
|
|
|
external: true
|
|
|
|
internal:
|