version: "2" services: nginx-proxy: image: jwilder/nginx-proxy:alpine restart: always ports: - "80:80" - "443:443" volumes: - /data/nginx/certs:/etc/nginx/certs - /data/nginx/vhost.d:/etc/nginx/vhost.d - /data/nginx/html:/usr/share/nginx/html - /var/run/docker.sock:/tmp/docker.sock:ro letsencrypt-companion: image: jrcs/letsencrypt-nginx-proxy-companion restart: always volumes-from: "nginx-proxy" environment: - "DEFAULT_EMAIL=hi@esin.io" volumes: - /var/run/docker.sock:/tmp/docker.sock:ro - /data/acme.sh:/etc/acme.sh #set environments in service #- VIRTUAL_HOST=sub.example.com #- VIRTUAL_PORT=3000 #- LETSENCRYPT_HOST=sub.example.com #- LETSENCRYPT_EMAIL=admin@example.com