test_dockergen_v3.yml 689 B

12345678910111213141516171819202122232425262728
  1. version: '3'
  2. services:
  3. nginx:
  4. image: nginx
  5. container_name: nginx
  6. volumes:
  7. - nginx_conf:/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:
  13. - /var/run/docker.sock:/tmp/docker.sock:ro
  14. - ./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl
  15. - nginx_conf:/etc/nginx/conf.d
  16. web:
  17. image: web
  18. container_name: whoami
  19. expose:
  20. - "80"
  21. environment:
  22. WEB_PORTS: 80
  23. VIRTUAL_HOST: whoami.nginx.container.docker
  24. volumes:
  25. nginx_conf: {}