test_dockergen_v2.yml 634 B

12345678910111213141516171819202122232425262728
  1. version: '2'
  2. services:
  3. nginx:
  4. image: nginx
  5. container_name: nginx
  6. volumes:
  7. - /etc/nginx/conf.d
  8. dockergen:
  9. image: nginxproxy/docker-gen
  10. command: -notify-sighup nginx -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
  11. volumes_from:
  12. - nginx
  13. volumes:
  14. - /var/run/docker.sock:/tmp/docker.sock:ro
  15. - ../../nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl
  16. environment:
  17. HTTPS_METHOD: nohttps
  18. web:
  19. image: web
  20. container_name: whoami
  21. expose:
  22. - "80"
  23. environment:
  24. WEB_PORTS: 80
  25. VIRTUAL_HOST: whoami.nginx.container.docker