#########################################################################################
###
### docker-compose.override.yml file for egroupware-mail package
###
### Place all your modifications in this file, instead of /etc/egroupware-mail/docker-compose.yml.
###
### If you want to make some modification / uncomment eg. some volumes, you also have to:
### - uncomment the service eg. "mail:", if not already uncommented
### - uncomment the "volumes:" section of the service
###
### services:
###   mail:
###      volumes:
###      - /path/to/certificate.pem:/etc/dovecot/certificate.pem
###
### Please note: indention with space (NOT tabs!) matter in .yml files!
###
##########################################################################################

version: '3'
# we need access to networks of egroupware to be able to access the db, if running in a container
# some distros (eg. Ubuntu 20.04) remove the dash from egroupware-docker_default (uncomment all 3 networks sections!)
#networks:
#  egroupware-docker_default:
#    external: false
#  egroupwaredocker_default:
#    external: true
#services:
#  mail:
#    networks:
#      - egroupwaredocker_default
#    extra_hosts:
#    # pre 20.1 installs run MariaDB on the host and need to change bind_address to docker0 172.17.0.1
#      - "db:172.17.0.1"
#    # to use a recognized (not self-signed) certificate, add it here (certificate.pem is the certificate plus the chain!)
#    # eg. to use the one created by LetsEncrypt's Certbot for the webserver use the following (replace your domain!)
#    hostname: <fully-qualified-hostname-as-used-in-certificate>
#    volumes:
#      - /etc/letsencrypt:/etc/letsencrypt
#      - /etc/letsencrypt/live/egw.example.org/privkey.pem:/etc/dovecot/certificate.key
#      - /etc/letsencrypt/live/egw.example.org/fullchain.pem:/etc/dovecot/certificate.pem
#
#  smtp:
#    networks:
#      - egroupwaredocker_default
#    hostname: egroupware-smtp
#    extra_hosts:
#    # pre 20.1 installs run MariaDB on the host
#      - "db:172.17.0.1"
#    # to use a recognized (not self-signed) certificate, add it here (certificate.pem is the certificate plus the chain!)
#    # eg. to use the one created by LetsEncrypt's Certbot for the webserver use the following (replace your domain!)
#    hostname: <fully-qualified-hostname-as-used-in-certificate>
#    volumes:
#      - /etc/letsencrypt:/etc/letsencrypt
#      - /etc/letsencrypt/live/egw.example.org/privkey.pem:/etc/postfix/certificate.key
#      - /etc/letsencrypt/live/egw.example.org/fullchain.pem:/etc/postfix/certificate.pem
#    # run the following command once to make sure mail-services get restarted on certificate renewal:
#    # certbot renew --force-renew --post-hook 'bash -c "cd /etc/egroupware-mail; docker-compose restart"'
