test_dockergen_v2.yml 647 B

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