version: '3.6' services: reverse-proxy: container_name: reverse-proxy image: nginxproxy/nginx-proxy:alpine restart: on-failure:3 labels: - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy" ports: - "80:80" - "443:443" environment: SSL_POLICY: "Mozilla-Modern" volumes: - /opt/mailcow-dockerized/data/assets/ssl/:/etc/ssl/mail/:ro - /var/run/docker.sock:/tmp/docker.sock:ro - ./data/certs/:/etc/nginx/certs:ro - ./data/conf.d/:/etc/nginx/conf.d/ - ./data/vhost.d/:/etc/nginx/vhost.d/ - ./data/html/:/usr/share/nginx/html/ - ./data/htpasswd/:/etc/nginx/htpasswd/ acme-companion: container_name: acme-companion depends_on: - reverse-proxy image: nginxproxy/acme-companion restart: on-failure:3 environment: ACME_POST_HOOK: /opt/share-certs.sh volumes: - /var/run/docker.sock:/var/run/docker.sock:ro - ./data/certs/:/etc/nginx/certs:rw - ./data/conf.d/:/etc/nginx/conf.d/ - ./data/vhost.d/:/etc/nginx/vhost.d/ - ./data/html/:/usr/share/nginx/html/ - ./data/acme.sh:/etc/acme.sh - ./data/share-certs.sh:/opt/share-certs.sh:ro - ./data/certs-shared/:/etc/nginx/certs-shared:rw