docker-compose-separate-containers.yml 543 B

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