forked from data.coop/ansible
132 lines
2.9 KiB
Plaintext
132 lines
2.9 KiB
Plaintext
|
# vim: ft=yaml.docker-compose
|
||
|
version: '3.6'
|
||
|
|
||
|
services:
|
||
|
postgres:
|
||
|
image: postgres:14-alpine
|
||
|
restart: always
|
||
|
environment:
|
||
|
POSTGRES_DB: mailu
|
||
|
POSTGRES_USER: mailu
|
||
|
POSTGRES_PASSWORD: "{{ postgres_passwords.mailu }}"
|
||
|
volumes:
|
||
|
- "./postgres:/var/lib/postgresql/data"
|
||
|
dns:
|
||
|
- "{{ services.mailu.dns }}"
|
||
|
|
||
|
redis:
|
||
|
image: redis:alpine
|
||
|
restart: always
|
||
|
volumes:
|
||
|
- "./redis:/data"
|
||
|
depends_on:
|
||
|
- resolver
|
||
|
dns:
|
||
|
- "{{ services.mailu.dns }}"
|
||
|
|
||
|
front:
|
||
|
image: ghcr.io/mailu/nginx:{{ services.mailu.version }}
|
||
|
restart: always
|
||
|
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:
|
||
|
- "993:993"
|
||
|
- "25:25"
|
||
|
- "587:587"
|
||
|
- "465:465"
|
||
|
networks:
|
||
|
- default
|
||
|
- external_services
|
||
|
|
||
|
resolver:
|
||
|
image: ghcr.io/mailu/unbound:{{ services.mailu.version }}
|
||
|
restart: always
|
||
|
env_file: mailu.env
|
||
|
networks:
|
||
|
default:
|
||
|
ipv4_address: "{{ services.mailu.dns }}"
|
||
|
|
||
|
admin:
|
||
|
image: ghcr.io/mailu/admin:{{ services.mailu.version }}
|
||
|
restart: always
|
||
|
env_file: "{{ services.mailu.volume_folder }}/mailu.env"
|
||
|
volumes:
|
||
|
- "./data:/data"
|
||
|
- "./dkim:/dkim"
|
||
|
depends_on:
|
||
|
- redis
|
||
|
- resolver
|
||
|
dns:
|
||
|
- "{{ services.mailu.dns }}"
|
||
|
|
||
|
imap:
|
||
|
image: ghcr.io/mailu/dovecot:{{ services.mailu.version }}
|
||
|
restart: always
|
||
|
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 }}
|
||
|
restart: always
|
||
|
env_file: mailu.env
|
||
|
volumes:
|
||
|
- "./mailqueue:/queue"
|
||
|
- "./overrides/postfix:/overrides:ro"
|
||
|
depends_on:
|
||
|
- front
|
||
|
- resolver
|
||
|
dns:
|
||
|
- "{{ services.mailu.dns }}"
|
||
|
|
||
|
antispam:
|
||
|
image: ghcr.io/mailu/rspamd:{{ services.mailu.version }}
|
||
|
hostname: antispam
|
||
|
restart: always
|
||
|
env_file: mailu.env
|
||
|
volumes:
|
||
|
- "./filter:/var/lib/rspamd"
|
||
|
- "./overrides/rspamd:/etc/rspamd/override.d:ro"
|
||
|
depends_on:
|
||
|
- front
|
||
|
- resolver
|
||
|
dns:
|
||
|
- "{{ services.mailu.dns }}"
|
||
|
|
||
|
webmail:
|
||
|
image: ghcr.io/mailu/rainloop:{{ services.mailu.version }}
|
||
|
restart: always
|
||
|
env_file: mailu.env
|
||
|
volumes:
|
||
|
- "./webmail:/data"
|
||
|
- "./overrides/rainloop:/overrides:ro"
|
||
|
depends_on:
|
||
|
- imap
|
||
|
- resolver
|
||
|
dns:
|
||
|
- "{{ services.mailu.dns }}"
|
||
|
|
||
|
networks:
|
||
|
default:
|
||
|
driver: bridge
|
||
|
ipam:
|
||
|
driver: default
|
||
|
config:
|
||
|
- subnet: "{{ services.mailu.subnet }}"
|
||
|
external_services:
|
||
|
external: true
|