version: '3.7' services: mail: image: tvial/docker-mailserver:release-v7.2.0 hostname: ${HOSTNAME} domainname: ${DOMAINNAME} container_name: ${CONTAINER_NAME} restart: always ports: - "25:25" - "143:143" - "587:587" - "993:993" volumes: - maildata:/var/mail - mailstate:/var/mail-state - maillogs:/var/log/mail - ./config/:/tmp/docker-mailserver/ - nginx_cert:/etc/letsencrypt/live/mail.poldebra.me env_file: - .env - env-mailserver cap_add: - NET_ADMIN - SYS_PTRACE networks: - internal roundcubedb: image: postgres:9.6-alpine restart: always env_file: - .env - env-roundcube volumes: - rb_db:/var/lib/postgresql/data/ networks: - internal roundcube: image: roundcube/roundcubemail:1.4.9-apache restart: always depends_on: - mail - roundcubedb env_file: - .env - env-roundcube volumes: - rb_config:/var/roundcube/config/ networks: - proxy - internal volumes: maildata: driver: local driver_opts: type: none o: bind device: "/srv/docker/mail/data" mailstate: driver: local driver_opts: type: none o: bind device: "/srv/docker/mail/state" maillogs: driver: local driver_opts: type: none o: bind device: "/srv/docker/mail/logs" rb_config: driver: local driver_opts: type: none o: bind device: "/srv/docker/mail/roundcube-config" rb_db: driver: local driver_opts: type: none o: bind device: "/srv/docker/mail/roundcube-db" nginx_cert: driver: local driver_opts: type: none o: bind device: "/srv/docker/reverse_proxy/certs/mail.poldebra.me" networks: proxy: external: true internal: