services:
  nginx-proxy:
    image: nginxproxy/nginx-proxy
    container_name: nginx-proxy
    ports:
    - "80:80"
    - "443:443"
    volumes:
    - html:/usr/share/nginx/html
    - certs:/etc/nginx/certs:ro
    - /var/run/docker.sock:/tmp/docker.sock:ro
    networks:
    - proxy-tier

  acme-companion:
    image: nginxproxy/acme-companion
    container_name: nginx-proxy-acme
    environment:
    - DEFAULT_EMAIL=mail@yourdomain.tld
    volumes_from:
    - nginx-proxy
    volumes:
    - certs:/etc/nginx/certs:rw
    - acme:/etc/acme.sh
    - /var/run/docker.sock:/var/run/docker.sock:ro
    networks:
    - proxy-tier

networks:
  proxy-tier:
    external: true

volumes:
  html:
  certs:
  acme:
