docker-compose-separate-containers.yml 569 B

123456789101112131415161718192021222324
  1. volumes:
  2. nginx_conf:
  3. services:
  4. nginx:
  5. image: nginx
  6. container_name: nginx
  7. ports:
  8. - "80:80"
  9. volumes:
  10. - nginx_conf:/etc/nginx/conf.d:ro
  11. dockergen:
  12. image: nginxproxy/docker-gen
  13. command: -notify-sighup nginx -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
  14. volumes:
  15. - /var/run/docker.sock:/tmp/docker.sock:ro
  16. - ./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl
  17. - nginx_conf:/etc/nginx/conf.d
  18. whoami:
  19. image: jwilder/whoami
  20. environment:
  21. - VIRTUAL_HOST=whoami.example