version: "3.8" networks: internalnet: driver: bridge enable_ipv6: false x-mail: &defaults env_file: local.env networks: - internalnet services: ddnsgd: <<: *defaults container_name: "ddnsgd" image: "ghcr.io/dominickbrasileiro/ddnsgd" restart: "always" pgsqlserver: <<: *defaults container_name: pgsqlserver image: postgres:15 volumes: - type: bind source: ./pgsql target: /var/lib/postgresql/data:z - ./config/pg-init-scripts:/docker-entrypoint-initdb.d:z restart: always ports: - "5432:5432" roundcubemail: <<: *defaults image: roundcube/roundcubemail:latest-fpm container_name: roundcubemail environment: - ROUNDCUBEMAIL_DB_HOST=pgsqlserver depends_on: - pgsqlserver links: - pgsqlserver ports: - "9000:9000" volumes: - ./nginx/html/:/var/www/html/:z mailserver: build: . <<: *defaults image: mailserver/docker-mailserver:latest container_name: mailserver hostname: mail domainname: zathura.leene.dev ports: - "25:25" - "143:143" - "587:587" - "993:993" volumes: - ./nginx/certs/:/etc/letsencrypt/live/:z - ./mail/mail-data/:/var/mail/:z - ./mail/mail-state/:/var/mail-state/:z - ./mail/mail-logs/:/var/log/mail/:z - ./mail/config/:/tmp/docker-mailserver/:z - ./nginx/certs/:/certs/:z - /etc/localtime:/etc/localtime:ro cap_add: - NET_ADMIN depends_on: - ddnsgd restart: always reverse-proxy: <<: *defaults image: nginxproxy/nginx-proxy container_name: nginx-proxy environment: - NGINX_PHP_CGI=roundcubemail:9000 restart: always ports: - "80:80" - "443:443" volumes: - ./nginx/conf/:/etc/nginx/conf.d:z - ./nginx/html/:/usr/share/nginx/html/:z - ./nginx/vhost/:/etc/nginx/vhost.d/:z - ./nginx/certs/:/etc/nginx/certs/:z - ./nginx/dhparam:/etc/nginx/dhparam:z - /var/run/docker.sock:/tmp/docker.sock:z depends_on: - ddnsgd acme-companion: <<: *defaults image: nginxproxy/acme-companion container_name: nginx-proxy-acme restart: always volumes_from: - reverse-proxy volumes: - ./nginx/certs/:/etc/nginx/certs/:z - ./nginx/acme-state/:/etc/acme.sh/:z - /var/run/docker.sock:/var/run/docker.sock:z depends_on: - ddnsgd