WIP mail stack

This commit is contained in:
Lieuwe Leene 2022-11-06 10:41:10 +01:00
parent 078558d06d
commit 4c574954fe
2 changed files with 33 additions and 35 deletions

View File

@ -2,6 +2,8 @@ version: "3.8"
networks: networks:
internalnet: internalnet:
driver: bridge
enable_ipv6: false
x-mail: &defaults x-mail: &defaults
@ -16,7 +18,7 @@ services:
image: "ghcr.io/dominickbrasileiro/ddnsgd" image: "ghcr.io/dominickbrasileiro/ddnsgd"
restart: "always" restart: "always"
database: pgsqlserver:
<<: *defaults <<: *defaults
container_name: pgsqlserver container_name: pgsqlserver
image: postgres:15 image: postgres:15
@ -29,33 +31,25 @@ services:
ports: ports:
- "5432:5432" - "5432:5432"
adminer:
<<: *defaults
image: adminer
restart: always
depends_on:
- database
ports:
- "8080:8080"
roundcubemail: roundcubemail:
<<: *defaults <<: *defaults
image: roundcube/roundcubemail:latest-fpm image: roundcube/roundcubemail:latest-fpm
container_name: roundcube container_name: roundcubemail
environment:
- ROUNDCUBEMAIL_DB_HOST=pgsqlserver
depends_on: depends_on:
- database - pgsqlserver
links: links:
- database - pgsqlserver
ports: ports:
- 9000:9000 - "9000:9000"
volumes: volumes:
- ./mail/html:/var/www/html:z - ./nginx/html/:/var/www/html/:z
mailserver: mailserver:
build: . build: .
<<: *defaults <<: *defaults
image: docker.io/mailserver/docker-mailserver:latest image: mailserver/docker-mailserver:latest
container_name: mailserver container_name: mailserver
hostname: mail hostname: mail
domainname: zathura.leene.dev domainname: zathura.leene.dev
@ -65,12 +59,12 @@ services:
- "587:587" - "587:587"
- "993:993" - "993:993"
volumes: volumes:
- ./mail/letsencrypt:/etc/letsencrypt:z - ./nginx/certs/:/etc/letsencrypt/live/:z
- ./mail/mail-data/:/var/mail/:z - ./mail/mail-data/:/var/mail/:z
- ./mail/mail-state/:/var/mail-state/:z - ./mail/mail-state/:/var/mail-state/:z
- ./mail/mail-logs/:/var/log/mail/:z - ./mail/mail-logs/:/var/log/mail/:z
- ./mail/config/:/tmp/docker-mailserver/:z - ./mail/config/:/tmp/docker-mailserver/:z
- ./mail/certs/:/certs:z - ./nginx/certs/:/certs/:z
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
cap_add: cap_add:
@ -83,6 +77,8 @@ services:
<<: *defaults <<: *defaults
image: nginxproxy/nginx-proxy image: nginxproxy/nginx-proxy
container_name: nginx-proxy container_name: nginx-proxy
environment:
- NGINX_PHP_CGI=roundcubemail:9000
restart: always restart: always
ports: ports:
- "80:80" - "80:80"
@ -91,9 +87,9 @@ services:
- ./nginx/conf/:/etc/nginx/conf.d:z - ./nginx/conf/:/etc/nginx/conf.d:z
- ./nginx/html/:/usr/share/nginx/html/:z - ./nginx/html/:/usr/share/nginx/html/:z
- ./nginx/vhost/:/etc/nginx/vhost.d/:z - ./nginx/vhost/:/etc/nginx/vhost.d/:z
- ./nginx/certs/:/etc/nginx/certs/:ro - ./nginx/certs/:/etc/nginx/certs/:z
- ./nginx/dhparam:/etc/nginx/dhparam:z - ./nginx/dhparam:/etc/nginx/dhparam:z
- /var/run/docker.sock:/tmp/docker.sock:ro - /var/run/docker.sock:/tmp/docker.sock:z
depends_on: depends_on:
- ddnsgd - ddnsgd
@ -105,8 +101,8 @@ services:
volumes_from: volumes_from:
- reverse-proxy - reverse-proxy
volumes: volumes:
- ./nginx/certs/:/etc/nginx/certs/:rw - ./nginx/certs/:/etc/nginx/certs/:z
- ./nginx/acme-state/:/etc/acme.sh/:z - ./nginx/acme-state/:/etc/acme.sh/:z
- /var/run/docker.sock:/var/run/docker.sock:ro - /var/run/docker.sock:/var/run/docker.sock:z
depends_on: depends_on:
- ddnsgd - ddnsgd

View File

@ -1,17 +1,24 @@
## Keys
ROUNDCUBEMAIL_DB_PASSWORD=hear397sew
POSTGRES_PASSWORD="hear397sew"
USERNAME="JaMolgvImRt3jznO"
PASSWORD="Enl0rRgqBsZPVupA"
## Docker Env
DEBUG=1 DEBUG=1
DOCKER_HOST_ROOTLESS_PATH=/run/user/1000/docker.sock PERMIT_DOCKER=network
## Google Dynamic DNS ## Google Dynamic DNS
INTERVAL=30 INTERVAL=30
HOSTNAME="zathura.leene.dev" HOSTNAME="zathura.leene.dev"
USERNAME="JaMolgvImRt3jznO"
PASSWORD="Enl0rRgqBsZPVupA"
## Mail Server Env ## Mail Server Env
POSTFIX_INET_PROTOCOLS=ipv4 POSTFIX_INET_PROTOCOLS=ipv4
TZ=NL TZ=Europe/Berlin
ENABLE_SPAMASSASSIN=1 ENABLE_SPAMASSASSIN=1
SPAMASSASSIN_SPAM_TO_INBOX=1 SPAMASSASSIN_SPAM_TO_INBOX=1
ENABLE_CLAMAV=1 ENABLE_CLAMAV=1
@ -25,33 +32,28 @@ POSTMASTER_ADDRESS=admin@leene.dev
ENABLE_UPDATE_CHECK=1 ENABLE_UPDATE_CHECK=1
SSL_TYPE=letsencrypt SSL_TYPE=letsencrypt
VIRTUAL_HOST=mail.zathura.leene.dev VIRTUAL_HOST=zathura.leene.dev,mail.zathura.leene.dev,git.zathura.leene.dev
LETSENCRYPT_HOST=mail.zathura.leene.dev LETSENCRYPT_HOST=zathura.leene.dev,mail.zathura.leene.dev,git.zathura.leene.dev
## SQL Server Env ## SQL Server Env
POSTGRES_USER="pgadmin" POSTGRES_USER="pgadmin"
POSTGRES_PASSWORD="hear397sew"
POSTGRES_INITDB_ARGS="--auth-host=scram-sha-256 --auth-local=scram-sha-256" POSTGRES_INITDB_ARGS="--auth-host=scram-sha-256 --auth-local=scram-sha-256"
POSTGRES_MULTIPLE_DATABASES="gitea, roundcube" POSTGRES_MULTIPLE_DATABASES="gitea, roundcube"
## Round Cube Env ## Round Cube Env
ROUNDCUBEMAIL_DB_TYPE=pgsql ROUNDCUBEMAIL_DB_TYPE=pgsql
ROUNDCUBEMAIL_DB_HOST=database
ROUNDCUBEMAIL_DB_NAME=roundcube ROUNDCUBEMAIL_DB_NAME=roundcube
ROUNDCUBEMAIL_DB_USER=roundcube ROUNDCUBEMAIL_DB_USER=roundcube
ROUNDCUBEMAIL_DB_PASSWORD=hear397sew
ROUNDCUBEMAIL_SKIN=elastic ROUNDCUBEMAIL_SKIN=elastic
ROUNDCUBEMAIL_DEFAULT_HOST=tls://mail.zathura.leene.dev ROUNDCUBEMAIL_DEFAULT_HOST=tls://mail.zathura.leene.dev
ROUNDCUBEMAIL_SMTP_SERVER=tls://mail.zathura.leene.dev ROUNDCUBEMAIL_SMTP_SERVER=tls://mail.zathura.leene.dev
## NGINX Reverse Proxy ## NGINX Reverse Proxy
NGINX_HOST=zathura.leene.dev
NGINX_PROXY_CONTAINER=nginx-proxy NGINX_PROXY_CONTAINER=nginx-proxy
LETSENCRYPT_TEST=true LETSENCRYPT_TEST=true
LETSENCRYPT_RESTART_CONTAINER=true LETSENCRYPT_RESTART_CONTAINER=true
DEFAULT_EMAIL=lieuwe@leene.dev DEFAULT_EMAIL=lieuwe@leene.dev
NGINX_HOST=zathura.leene.dev
NGINX_PHP_CGI=roundcubemail:9000