mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 05:36:59 +01:00
Add mailu and nextcloud
This commit is contained in:
parent
409828214b
commit
643ab3229a
20 changed files with 583 additions and 4 deletions
2
roles/mailu-docker/defaults/main.yml
Normal file
2
roles/mailu-docker/defaults/main.yml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
mailu_secret_key:
|
||||
108
roles/mailu-docker/files/mailu/docker-compose.yml
Normal file
108
roles/mailu-docker/files/mailu/docker-compose.yml
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
version: '2'
|
||||
|
||||
networks:
|
||||
proxy-tier:
|
||||
external:
|
||||
name: nginx-proxy
|
||||
|
||||
services:
|
||||
redis:
|
||||
image: redis:latest
|
||||
restart: always
|
||||
volumes:
|
||||
- "$ROOT/redis:/data"
|
||||
|
||||
imap:
|
||||
image: mailu/dovecot:$VERSION
|
||||
restart: always
|
||||
env_file: .env
|
||||
ports:
|
||||
- "$BIND_ADDRESS:110:110"
|
||||
- "$BIND_ADDRESS:143:143"
|
||||
- "$BIND_ADDRESS:993:993"
|
||||
- "$BIND_ADDRESS:995:995"
|
||||
- "$BIND_ADDRESS:4190:4190"
|
||||
volumes:
|
||||
- "$ROOT/data:/data"
|
||||
- "$ROOT/mail:/mail"
|
||||
- "../proxy/nginx/certs/${DOMAIN}.crt:/certs/cert.pem"
|
||||
- "../proxy/nginx/certs/${DOMAIN}.key:/certs/key.pem"
|
||||
- "$ROOT/overrides:/overrides"
|
||||
|
||||
smtp:
|
||||
image: mailu/postfix:$VERSION
|
||||
restart: always
|
||||
env_file: .env
|
||||
ports:
|
||||
- "$BIND_ADDRESS:25:25"
|
||||
- "$BIND_ADDRESS:465:465"
|
||||
- "$BIND_ADDRESS:587:587"
|
||||
volumes:
|
||||
- "$ROOT/data:/data"
|
||||
- "../proxy/nginx/certs/${DOMAIN}.crt:/certs/cert.pem"
|
||||
- "../proxy/nginx/certs/${DOMAIN}.key:/certs/key.pem"
|
||||
- "$ROOT/overrides:/overrides"
|
||||
|
||||
milter:
|
||||
image: mailu/rmilter:$VERSION
|
||||
restart: always
|
||||
env_file: .env
|
||||
volumes:
|
||||
- "$ROOT/filter:/data"
|
||||
- "$ROOT/dkim:/dkim"
|
||||
- "$ROOT/overrides:/overrides"
|
||||
|
||||
antispam:
|
||||
image: mailu/rspamd:$VERSION
|
||||
restart: always
|
||||
env_file: .env
|
||||
volumes:
|
||||
- "$ROOT/filter:/var/lib/rspamd"
|
||||
|
||||
antivirus:
|
||||
image: mailu/clamav:$VERSION
|
||||
restart: always
|
||||
env_file: .env
|
||||
volumes:
|
||||
- "$ROOT/filter:/data"
|
||||
|
||||
webdav:
|
||||
image: mailu/$WEBDAV:$VERSION
|
||||
restart: always
|
||||
env_file: .env
|
||||
volumes:
|
||||
- "$ROOT/dav:/data"
|
||||
|
||||
admin:
|
||||
image: mailu/admin:$VERSION
|
||||
restart: always
|
||||
env_file: .env
|
||||
#hostname: mailu.banditlair.com
|
||||
ports:
|
||||
- "127.0.0.1:8000:80"
|
||||
environment:
|
||||
- VIRTUAL_HOST=${HOSTNAME}
|
||||
- VIRTUAL_NETWORK=nginx-proxy
|
||||
- VIRTUAL_PORT=8000
|
||||
volumes:
|
||||
- "$ROOT/data:/data"
|
||||
- "$ROOT/dkim:/dkim"
|
||||
- "../proxy/nginx/certs/${DOMAIN}.crt:/certs/cert.pem"
|
||||
- "../proxy/nginx/certs/${DOMAIN}.key:/certs/key.pem"
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
networks:
|
||||
- proxy-tier
|
||||
|
||||
#webmail:
|
||||
# image: "mailu/$WEBMAIL:$VERSION"
|
||||
# restart: always
|
||||
# env_file: .env
|
||||
# volumes:
|
||||
# - "$ROOT/webmail:/data"
|
||||
|
||||
fetchmail:
|
||||
image: mailu/fetchmail:$VERSION
|
||||
restart: always
|
||||
env_file: .env
|
||||
volumes:
|
||||
- "$ROOT/data:/data"
|
||||
2
roles/mailu-docker/meta/main.yml
Normal file
2
roles/mailu-docker/meta/main.yml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
dependencies:
|
||||
- nginx-proxy-docker
|
||||
7
roles/mailu-docker/tasks/main.yml
Normal file
7
roles/mailu-docker/tasks/main.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
- name: Copy mailu config
|
||||
copy: src=mailu dest={{docker_compose_files_folder}}
|
||||
- name: Create mailu config
|
||||
template: src=mailu/.env dest={{docker_compose_files_folder}}/mailu/.env
|
||||
- name: Start mailu docker project
|
||||
docker_service: project_src={{docker_compose_files_folder}}/mailu state=present
|
||||
84
roles/mailu-docker/templates/mailu/.env
Normal file
84
roles/mailu-docker/templates/mailu/.env
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
# Mailu main configuration file
|
||||
#
|
||||
# Most configuration variables can be modified through the Web interface,
|
||||
# these few settings must however be configured before starting the mail
|
||||
# server and require a restart upon change.
|
||||
|
||||
###################################
|
||||
# Common configuration variables
|
||||
###################################
|
||||
|
||||
# Set this to the path where Mailu data and configuration is stored
|
||||
ROOT=/var/lib/mailu
|
||||
|
||||
# Mailu version to run (stable, 1.0, 1.1, etc. or latest)
|
||||
VERSION=stable
|
||||
|
||||
# Set to a randomly generated 16 bytes string
|
||||
SECRET_KEY={{mailu_secret_key}}
|
||||
|
||||
# Address where listening ports should bind
|
||||
BIND_ADDRESS={{inventory_hostname}}
|
||||
|
||||
# Main mail domain
|
||||
DOMAIN=banditlair.com
|
||||
|
||||
# Exposed mail-server hostname
|
||||
HOSTNAME=mail.banditlair.com
|
||||
|
||||
# Postmaster local part (will append the main mail domain)
|
||||
POSTMASTER=admin
|
||||
|
||||
# Docker-compose project name, this will prepended to containers names.
|
||||
COMPOSE_PROJECT_NAME=mailu
|
||||
|
||||
###################################
|
||||
# Optional features
|
||||
###################################
|
||||
|
||||
# Choose which frontend Web server to run if any (value: nginx, nginx-no-https, none)
|
||||
FRONTEND=none
|
||||
|
||||
# Choose which webmail to run if any (values: roundcube, rainloop, none)
|
||||
WEBMAIL=none
|
||||
|
||||
# Expose the admin interface in publicly (values: yes, no)
|
||||
EXPOSE_ADMIN=no
|
||||
|
||||
# Use Letsencrypt to generate a TLS certificate (uncomment to enable)
|
||||
ENABLE_CERTBOT=True
|
||||
|
||||
# Dav server implementation (value: radicale, none)
|
||||
WEBDAV=none
|
||||
|
||||
###################################
|
||||
# Mail settings
|
||||
###################################
|
||||
|
||||
# Message size limit in bytes
|
||||
# Default: accept messages up to 50MB
|
||||
MESSAGE_SIZE_LIMIT=50000000
|
||||
|
||||
# Networks granted relay permissions, make sure that you include your Docker
|
||||
# internal network (default to 172.17.0.0/16)
|
||||
RELAYNETS=172.25.0.0/16
|
||||
|
||||
# Will relay all outgoing mails if configured
|
||||
RELAYHOST=
|
||||
|
||||
# Fetchmail delay
|
||||
FETCHMAIL_DELAY=600
|
||||
|
||||
###################################
|
||||
# Nginx settings
|
||||
###################################
|
||||
|
||||
# SSL DHPARAM Bits
|
||||
#NGINX_SSL_DHPARAM_BITS=2048
|
||||
|
||||
###################################
|
||||
# Developers
|
||||
###################################
|
||||
|
||||
# Uncomment this to enable debugging globally
|
||||
#DEBUG=True
|
||||
Loading…
Add table
Add a link
Reference in a new issue