Some cleanup and changes:

- Don't upgrade the docker-compose file. (Not in the scope of this feature)
- No need to use aliases. Docker already resolves to service names
- Use a fixed IP range, which stays clear of the network ranges used by Docker. (172.xx.0.0/16)
master
Tim Möhlmann 6 years ago
parent 013d02d726
commit cde22be4c9
No known key found for this signature in database
GPG Key ID: AFABC30066A39335

@ -21,9 +21,6 @@ SECRET_KEY=ChangeMeChangeMe
BIND_ADDRESS4=127.0.0.1 BIND_ADDRESS4=127.0.0.1
BIND_ADDRESS6=::1 BIND_ADDRESS6=::1
# Internal Docker network
IPV4_NETWORK=172.22.1
# Main mail domain # Main mail domain
DOMAIN=mailu.io DOMAIN=mailu.io

@ -1,4 +1,4 @@
version: '2.1' version: '2'
services: services:
@ -30,20 +30,14 @@ services:
depends_on: depends_on:
- unbound - unbound
dns: dns:
- ${IPV4_NETWORK:-172.22.1}.254 - 10.177.20.254
networks:
backend:
aliases:
- front
unbound: unbound:
image: mailu/unbound:$VERSION image: mailu/unbound:$VERSION
restart: always restart: always
networks: networks:
backend: default:
ipv4_address: ${IPV4_NETWORK:-172.22.1}.254 ipv4_address: 10.177.20.254
aliases:
- unbound
redis: redis:
image: redis:alpine image: redis:alpine
@ -51,13 +45,9 @@ services:
volumes: volumes:
- "$ROOT/redis:/data" - "$ROOT/redis:/data"
dns: dns:
- ${IPV4_NETWORK:-172.22.1}.254 - 10.177.20.254
depends_on: depends_on:
- unbound - unbound
networks:
backend:
aliases:
- redis
imap: imap:
image: mailu/dovecot:$VERSION image: mailu/dovecot:$VERSION
@ -71,11 +61,7 @@ services:
- front - front
- unbound - unbound
dns: dns:
- ${IPV4_NETWORK:-172.22.1}.254 - 10.177.20.254
networks:
backend:
aliases:
- imap
smtp: smtp:
image: mailu/postfix:$VERSION image: mailu/postfix:$VERSION
@ -88,11 +74,7 @@ services:
- front - front
- unbound - unbound
dns: dns:
- ${IPV4_NETWORK:-172.22.1}.254 - 10.177.20.254
networks:
backend:
aliases:
- smtp
antispam: antispam:
image: mailu/rspamd:$VERSION image: mailu/rspamd:$VERSION
@ -106,11 +88,7 @@ services:
- front - front
- unbound - unbound
dns: dns:
- ${IPV4_NETWORK:-172.22.1}.254 - 10.177.20.254
networks:
backend:
aliases:
- antispam
antivirus: antivirus:
image: mailu/$ANTIVIRUS:$VERSION image: mailu/$ANTIVIRUS:$VERSION
@ -121,11 +99,7 @@ services:
depends_on: depends_on:
- unbound - unbound
dns: dns:
- ${IPV4_NETWORK:-172.22.1}.254 - 10.177.20.254
networks:
backend:
aliases:
- antivirus
webdav: webdav:
image: mailu/$WEBDAV:$VERSION image: mailu/$WEBDAV:$VERSION
@ -136,11 +110,7 @@ services:
depends_on: depends_on:
- unbound - unbound
dns: dns:
- ${IPV4_NETWORK:-172.22.1}.254 - 10.177.20.254
networks:
backend:
aliases:
- webdav
admin: admin:
image: mailu/admin:$VERSION image: mailu/admin:$VERSION
@ -154,11 +124,7 @@ services:
- redis - redis
- unbound - unbound
dns: dns:
- ${IPV4_NETWORK:-172.22.1}.254 - 10.177.20.254
networks:
backend:
aliases:
- admin
webmail: webmail:
image: "mailu/$WEBMAIL:$VERSION" image: "mailu/$WEBMAIL:$VERSION"
@ -170,11 +136,7 @@ services:
- imap - imap
- unbound - unbound
dns: dns:
- ${IPV4_NETWORK:-172.22.1}.254 - 10.177.20.254
networks:
backend:
aliases:
- webmail
fetchmail: fetchmail:
image: mailu/fetchmail:$VERSION image: mailu/fetchmail:$VERSION
@ -185,16 +147,12 @@ services:
depends_on: depends_on:
- unbound - unbound
dns: dns:
- ${IPV4_NETWORK:-172.22.1}.254 - 10.177.20.254
networks:
backend:
aliases:
- fetchmail
networks: networks:
backend: default:
driver: bridge driver: bridge
ipam: ipam:
driver: default driver: default
config: config:
- subnet: ${IPV4_NETWORK:-172.22.1}.0/24 - subnet: 10.177.20.0/24

Loading…
Cancel
Save