Guest User

Untitled

a guest
May 23rd, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. # This file containers the "ingress" point: the "nginx" container binds to 80 and 443 on the host.
  2. # The `nginx-proxy` network must exist before `docker-compose up` is called.
  3.  
  4. version: "2"
  5.  
  6. services:
  7. nginx:
  8. restart: always
  9. image: nginx
  10. container_name: nginx
  11. ports:
  12. - "80:80"
  13. - "443:443"
  14. volumes:
  15. - "./volumes/proxy/conf.d:/etc/nginx/conf.d"
  16. - "/etc/nginx/vhost.d"
  17. - "/usr/share/nginx/html"
  18. - "./volumes/proxy/certs:/etc/nginx/certs:ro"
  19.  
  20. nginx-gen:
  21. restart: always
  22. image: jwilder/docker-gen
  23. container_name: nginx-gen
  24. volumes:
  25. - "/var/run/docker.sock:/tmp/docker.sock:ro"
  26. - "./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro"
  27. volumes_from:
  28. - nginx
  29. entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
  30. environment:
  31. - DEFAULT_HOST=defaultcontainer.hostname
  32.  
  33. letsencrypt-nginx-proxy-companion:
  34. restart: always
  35. image: jrcs/letsencrypt-nginx-proxy-companion
  36. container_name: letsencrypt-nginx-proxy-companion
  37. volumes_from:
  38. - nginx
  39. volumes:
  40. - "/var/run/docker.sock:/var/run/docker.sock:ro"
  41. - "./volumes/proxy/certs:/etc/nginx/certs:rw"
  42. environment:
  43. - NGINX_DOCKER_GEN_CONTAINER=nginx-gen
  44.  
  45. networks:
  46. default:
  47. external:
  48. name: nginx-proxy
Add Comment
Please, Sign In to add comment