docker-compose.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. version: '3.6'
  2. services:
  3. reverse-proxy:
  4. container_name: reverse-proxy
  5. image: nginxproxy/nginx-proxy:alpine
  6. restart: on-failure:3
  7. labels:
  8. - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
  9. ports:
  10. - "80:80"
  11. - "443:443"
  12. environment:
  13. SSL_POLICY: "Mozilla-Modern"
  14. volumes:
  15. - /opt/mailcow-dockerized/data/assets/ssl/:/etc/ssl/mail/:ro
  16. - /var/run/docker.sock:/tmp/docker.sock:ro
  17. - ./data/certs/:/etc/nginx/certs:ro
  18. - ./data/conf.d/:/etc/nginx/conf.d/
  19. - ./data/vhost.d/:/etc/nginx/vhost.d/
  20. - ./data/html/:/usr/share/nginx/html/
  21. - ./data/htpasswd/:/etc/nginx/htpasswd/
  22. acme-companion:
  23. container_name: acme-companion
  24. depends_on:
  25. - reverse-proxy
  26. image: nginxproxy/acme-companion
  27. restart: on-failure:3
  28. environment:
  29. ACME_POST_HOOK: /opt/share-certs.sh
  30. volumes:
  31. - /var/run/docker.sock:/var/run/docker.sock:ro
  32. - ./data/certs/:/etc/nginx/certs:rw
  33. - ./data/conf.d/:/etc/nginx/conf.d/
  34. - ./data/vhost.d/:/etc/nginx/vhost.d/
  35. - ./data/html/:/usr/share/nginx/html/
  36. - ./data/acme.sh:/etc/acme.sh
  37. - ./data/share-certs.sh:/opt/share-certs.sh:ro
  38. - ./data/certs-shared/:/etc/nginx/certs-shared:rw