version: '3.7' services: nginx: image: jwilder/nginx-proxy restart: always ports: - 80:80 - 443:443 volumes: - /var/run/docker.sock:/tmp/docker.sock:ro - nginx_cert:/etc/nginx/certs - nginx_vhost:/etc/nginx/vhost.d - nginx_html:/usr/share/nginx/html labels: - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy" networks: - proxy nginx-letsencript: image: jrcs/letsencrypt-nginx-proxy-companion restart: always volumes: - /var/run/docker.sock:/var/run/docker.sock:ro - nginx_cert:/etc/nginx/certs - nginx_vhost:/etc/nginx/vhost.d - nginx_html:/usr/share/nginx/html networks: - proxy # web: # image: nginx # environment: # - NGINX_HOST=mail.poldebra.me # - NGINX_PORT=80 # - VIRTUAL_HOST=mail.poldebra.me # - VIRTUAL_PORT=80 # - LETSENCRYPT_HOST=mail.poldebra.me # - LETSENCRYPT_EMAIL=poloniodavide@gmail.com # networks: # - proxy volumes: nginx_cert: driver: local driver_opts: type: none o: bind device: "/srv/docker/reverse_proxy/certs" nginx_vhost: nginx_html: networks: proxy: external: true