mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-10 06:51:04 +01:00
256 lines
5.0 KiB
Django/Jinja
256 lines
5.0 KiB
Django/Jinja
version: '2.2'
|
|
|
|
services:
|
|
|
|
# External dependencies
|
|
redis:
|
|
image: redis:alpine
|
|
restart: always
|
|
env_file: mailu.env
|
|
volumes:
|
|
- "redis_data:/data"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 1s
|
|
timeout: 3s
|
|
retries: 30
|
|
logging:
|
|
driver: journald
|
|
depends_on:
|
|
- resolver
|
|
dns:
|
|
- 192.168.203.254
|
|
|
|
database:
|
|
image: mariadb
|
|
restart: always
|
|
environment:
|
|
MYSQL_DATABASE: "mailu"
|
|
MYSQL_USER: "mailu"
|
|
MYSQL_PASSWORD: "{{mailu_database_password}}"
|
|
MYSQL_ROOT_PASSWORD: "{{mailu_database_password}}"
|
|
MARIADB_AUTO_UPGRADE: "1"
|
|
volumes:
|
|
- database:/var/lib/mysql
|
|
healthcheck:
|
|
test: "/usr/bin/mariadb --user=mailu --password={{mailu_database_password}} --execute \"SHOW DATABASES;\""
|
|
interval: 3s
|
|
timeout: 1s
|
|
retries: 5
|
|
logging:
|
|
driver: journald
|
|
depends_on:
|
|
- resolver
|
|
dns:
|
|
- 192.168.203.254
|
|
networks:
|
|
- default
|
|
- webmail
|
|
- radicale
|
|
|
|
# Core services
|
|
resolver:
|
|
image: ghcr.io/mailu/unbound:{{version_mailu}}
|
|
env_file: mailu.env
|
|
restart: always
|
|
networks:
|
|
default:
|
|
ipv4_address: 192.168.203.254
|
|
logging:
|
|
driver: journald
|
|
|
|
front:
|
|
image: ghcr.io/mailu/nginx:{{version_mailu}}
|
|
restart: always
|
|
env_file: mailu.env
|
|
logging:
|
|
driver: journald
|
|
ports:
|
|
- "127.0.0.1:{{ http_port }}:80"
|
|
- "{{ ip4_address }}:25:25"
|
|
- "{{ ip4_address }}:465:465"
|
|
- "{{ ip4_address }}:{{system_email_port}}:{{system_email_port}}"
|
|
- "{{ ip4_address }}:110:110"
|
|
- "{{ ip4_address }}:995:995"
|
|
- "{{ ip4_address }}:143:143"
|
|
- "{{ ip4_address }}:993:993"
|
|
volumes:
|
|
- "/etc/mailu/overrides/nginx:/overrides:ro"
|
|
- "/etc/mailu/certs:/certs"
|
|
depends_on:
|
|
resolver:
|
|
condition: service_started
|
|
database:
|
|
condition: service_healthy
|
|
networks:
|
|
- default
|
|
- webmail
|
|
- radicale
|
|
dns:
|
|
- 192.168.203.254
|
|
|
|
admin:
|
|
image: ghcr.io/mailu/admin:{{version_mailu}}
|
|
restart: always
|
|
env_file: mailu.env
|
|
volumes:
|
|
- "admin_data:/data"
|
|
- "dkim:/dkim"
|
|
depends_on:
|
|
- resolver
|
|
- front
|
|
- redis
|
|
- database
|
|
logging:
|
|
driver: journald
|
|
dns:
|
|
- 192.168.203.254
|
|
imap:
|
|
image: ghcr.io/mailu/dovecot:{{version_mailu}}
|
|
restart: always
|
|
env_file: mailu.env
|
|
volumes:
|
|
- "dovecot_mail:/mail"
|
|
- "/etc/mailu/overrides:/overrides:ro"
|
|
depends_on:
|
|
- front
|
|
- resolver
|
|
dns:
|
|
- 192.168.203.254
|
|
logging:
|
|
driver: journald
|
|
|
|
smtp:
|
|
image: ghcr.io/mailu/postfix:{{version_mailu}}
|
|
restart: always
|
|
env_file: mailu.env
|
|
volumes:
|
|
- "/etc/mailu/overrides:/overrides:ro"
|
|
- "smtp_queue:/queue"
|
|
depends_on:
|
|
- front
|
|
- resolver
|
|
dns:
|
|
- 192.168.203.254
|
|
logging:
|
|
driver: journald
|
|
|
|
oletools:
|
|
image: ghcr.io/mailu/oletools:{{version_mailu}}
|
|
hostname: oletools
|
|
restart: always
|
|
depends_on:
|
|
- resolver
|
|
dns:
|
|
- 192.168.203.254
|
|
networks:
|
|
- noinet
|
|
|
|
antispam:
|
|
image: ghcr.io/mailu/rspamd:{{version_mailu}}
|
|
restart: always
|
|
env_file: mailu.env
|
|
volumes:
|
|
- "filter:/var/lib/rspamd"
|
|
- "dkim:/dkim"
|
|
- "/etc/mailu/overrides/rspamd:/overrides:ro"
|
|
depends_on:
|
|
- front
|
|
- redis
|
|
- antivirus
|
|
- resolver
|
|
dns:
|
|
- 192.168.203.254
|
|
networks:
|
|
- default
|
|
- noinet
|
|
logging:
|
|
driver: journald
|
|
|
|
# Optional services
|
|
antivirus:
|
|
image: ghcr.io/mailu/clamav:{{version_mailu}}
|
|
restart: always
|
|
env_file: mailu.env
|
|
volumes:
|
|
- "filter:/data"
|
|
depends_on:
|
|
- resolver
|
|
dns:
|
|
- 192.168.203.254
|
|
logging:
|
|
driver: journald
|
|
|
|
webdav:
|
|
image: ghcr.io/mailu/radicale:{{version_mailu}}
|
|
restart: always
|
|
env_file: mailu.env
|
|
volumes:
|
|
- "webdav_data:/data"
|
|
logging:
|
|
driver: journald
|
|
networks:
|
|
- radicale
|
|
depends_on:
|
|
- resolver
|
|
dns:
|
|
- 192.168.203.254
|
|
|
|
fetchmail:
|
|
image: ghcr.io/mailu/fetchmail:{{version_mailu}}
|
|
volumes:
|
|
- "admin_data:/data"
|
|
restart: always
|
|
env_file: mailu.env
|
|
logging:
|
|
driver: journald
|
|
depends_on:
|
|
- admin
|
|
- smtp
|
|
- imap
|
|
- resolver
|
|
dns:
|
|
- 192.168.203.254
|
|
|
|
webmail:
|
|
image: ghcr.io/mailu/webmail:{{version_mailu}}
|
|
restart: always
|
|
env_file: mailu.env
|
|
volumes:
|
|
- "webmail_data:/data"
|
|
- "/etc/mailu/overrides:/overrides:ro"
|
|
depends_on:
|
|
- imap
|
|
- front
|
|
- resolver
|
|
logging:
|
|
driver: journald
|
|
networks:
|
|
- webmail
|
|
dns:
|
|
- 192.168.203.254
|
|
|
|
volumes:
|
|
database:
|
|
smtp_queue:
|
|
admin_data:
|
|
webdav_data:
|
|
webmail_data:
|
|
filter:
|
|
dkim:
|
|
dovecot_mail:
|
|
redis_data:
|
|
networks:
|
|
default:
|
|
driver: bridge
|
|
ipam:
|
|
driver: default
|
|
config:
|
|
- subnet: {{mailu_subnet}}
|
|
radicale:
|
|
driver: bridge
|
|
webmail:
|
|
driver: bridge
|
|
noinet:
|
|
driver: bridge
|
|
internal: true |