2023-09-30 14:25:06 +00:00
|
|
|
# vim: ft=yaml.docker-compose
|
2023-12-10 17:04:50 +00:00
|
|
|
version: "3.8"
|
2023-09-30 14:25:06 +00:00
|
|
|
|
|
|
|
services:
|
|
|
|
postgres:
|
2023-12-10 17:04:50 +00:00
|
|
|
image: postgres:{{ services.mailu.postgres_version }}
|
|
|
|
restart: unless-stopped
|
2023-09-30 14:25:06 +00:00
|
|
|
environment:
|
|
|
|
POSTGRES_DB: mailu
|
|
|
|
POSTGRES_USER: mailu
|
|
|
|
POSTGRES_PASSWORD: "{{ postgres_passwords.mailu }}"
|
|
|
|
volumes:
|
|
|
|
- "./postgres:/var/lib/postgresql/data"
|
|
|
|
dns:
|
|
|
|
- "{{ services.mailu.dns }}"
|
|
|
|
|
|
|
|
redis:
|
2023-12-10 17:04:50 +00:00
|
|
|
image: redis:{{ services.mailu.redis_version }}
|
|
|
|
restart: unless-stopped
|
2023-09-30 14:25:06 +00:00
|
|
|
volumes:
|
|
|
|
- "./redis:/data"
|
|
|
|
depends_on:
|
|
|
|
- resolver
|
|
|
|
dns:
|
|
|
|
- "{{ services.mailu.dns }}"
|
|
|
|
|
|
|
|
front:
|
|
|
|
image: ghcr.io/mailu/nginx:{{ services.mailu.version }}
|
2023-12-10 17:04:50 +00:00
|
|
|
restart: unless-stopped
|
2023-09-30 14:25:06 +00:00
|
|
|
env_file: mailu.env
|
|
|
|
environment:
|
|
|
|
VIRTUAL_HOST: "{{ services.mailu.domain }}"
|
|
|
|
LETSENCRYPT_HOST: "{{ services.mailu.domain }}"
|
|
|
|
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
|
|
|
volumes:
|
|
|
|
- "./certs:/certs"
|
|
|
|
- "./overrides/nginx:/overrides:ro"
|
|
|
|
expose:
|
|
|
|
- "80"
|
|
|
|
ports:
|
|
|
|
- "25:25"
|
|
|
|
- "465:465"
|
2023-12-10 17:04:50 +00:00
|
|
|
- "587:587"
|
|
|
|
- "110:110"
|
|
|
|
- "995:995"
|
|
|
|
- "143:143"
|
|
|
|
- "993:993"
|
2023-09-30 14:25:06 +00:00
|
|
|
networks:
|
|
|
|
- default
|
2023-12-10 17:04:50 +00:00
|
|
|
- webmail
|
2023-09-30 14:25:06 +00:00
|
|
|
- external_services
|
2023-12-10 17:04:50 +00:00
|
|
|
depends_on:
|
|
|
|
- resolver
|
|
|
|
dns:
|
|
|
|
- "{{ services.mailu.dns }}"
|
2023-09-30 14:25:06 +00:00
|
|
|
|
|
|
|
resolver:
|
|
|
|
image: ghcr.io/mailu/unbound:{{ services.mailu.version }}
|
2023-12-10 17:04:50 +00:00
|
|
|
restart: unless-stopped
|
2023-09-30 14:25:06 +00:00
|
|
|
env_file: mailu.env
|
|
|
|
networks:
|
|
|
|
default:
|
|
|
|
ipv4_address: "{{ services.mailu.dns }}"
|
|
|
|
|
|
|
|
admin:
|
|
|
|
image: ghcr.io/mailu/admin:{{ services.mailu.version }}
|
2023-12-10 17:04:50 +00:00
|
|
|
restart: unless-stopped
|
|
|
|
env_file: mailu.env
|
2023-09-30 14:25:06 +00:00
|
|
|
volumes:
|
|
|
|
- "./data:/data"
|
|
|
|
- "./dkim:/dkim"
|
|
|
|
depends_on:
|
|
|
|
- redis
|
|
|
|
- resolver
|
|
|
|
dns:
|
|
|
|
- "{{ services.mailu.dns }}"
|
|
|
|
|
|
|
|
imap:
|
|
|
|
image: ghcr.io/mailu/dovecot:{{ services.mailu.version }}
|
2023-12-10 17:04:50 +00:00
|
|
|
restart: unless-stopped
|
2023-09-30 14:25:06 +00:00
|
|
|
env_file: mailu.env
|
|
|
|
volumes:
|
|
|
|
- "./mail:/mail"
|
|
|
|
- "./overrides/dovecot:/overrides:ro"
|
|
|
|
depends_on:
|
|
|
|
- front
|
|
|
|
- resolver
|
|
|
|
dns:
|
|
|
|
- "{{ services.mailu.dns }}"
|
|
|
|
|
|
|
|
smtp:
|
|
|
|
image: ghcr.io/mailu/postfix:{{ services.mailu.version }}
|
2023-12-10 17:04:50 +00:00
|
|
|
restart: unless-stopped
|
2023-09-30 14:25:06 +00:00
|
|
|
env_file: mailu.env
|
|
|
|
volumes:
|
|
|
|
- "./mailqueue:/queue"
|
|
|
|
- "./overrides/postfix:/overrides:ro"
|
|
|
|
depends_on:
|
|
|
|
- front
|
|
|
|
- resolver
|
|
|
|
dns:
|
|
|
|
- "{{ services.mailu.dns }}"
|
|
|
|
|
2023-12-10 17:04:50 +00:00
|
|
|
|
2023-09-30 14:25:06 +00:00
|
|
|
antispam:
|
|
|
|
image: ghcr.io/mailu/rspamd:{{ services.mailu.version }}
|
|
|
|
hostname: antispam
|
2023-12-10 17:04:50 +00:00
|
|
|
restart: unless-stopped
|
2023-09-30 14:25:06 +00:00
|
|
|
env_file: mailu.env
|
|
|
|
volumes:
|
|
|
|
- "./filter:/var/lib/rspamd"
|
2023-12-10 17:04:50 +00:00
|
|
|
- "./overrides/rspamd:/overrides:ro"
|
2023-09-30 14:25:06 +00:00
|
|
|
depends_on:
|
|
|
|
- front
|
2023-12-10 17:04:50 +00:00
|
|
|
- redis
|
2023-09-30 14:25:06 +00:00
|
|
|
- resolver
|
|
|
|
dns:
|
|
|
|
- "{{ services.mailu.dns }}"
|
|
|
|
|
|
|
|
webmail:
|
2023-12-10 17:04:50 +00:00
|
|
|
image: ghcr.io/mailu/webmail:{{ services.mailu.version }}
|
|
|
|
restart: unless-stopped
|
2023-09-30 14:25:06 +00:00
|
|
|
env_file: mailu.env
|
|
|
|
volumes:
|
|
|
|
- "./webmail:/data"
|
2023-12-10 17:04:50 +00:00
|
|
|
- "./overrides/snappymail:/overrides:ro"
|
|
|
|
networks:
|
|
|
|
- webmail
|
2023-09-30 14:25:06 +00:00
|
|
|
depends_on:
|
2023-12-10 17:04:50 +00:00
|
|
|
- front
|
2023-09-30 14:25:06 +00:00
|
|
|
|
|
|
|
networks:
|
|
|
|
default:
|
|
|
|
driver: bridge
|
|
|
|
ipam:
|
|
|
|
driver: default
|
|
|
|
config:
|
|
|
|
- subnet: "{{ services.mailu.subnet }}"
|
2023-12-10 17:04:50 +00:00
|
|
|
webmail:
|
|
|
|
driver: bridge
|
2023-09-30 14:25:06 +00:00
|
|
|
external_services:
|
|
|
|
external: true
|