docker-compose-separate-containers.yml 534 B

1234567891011121314151617181920212223
  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: jwilder/docker-gen
  12. command: -notify-sighup nginx -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
  13. volumes_from:
  14. - nginx
  15. volumes:
  16. - /var/run/docker.sock:/tmp/docker.sock:ro
  17. - ./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl
  18. whoami:
  19. image: jwilder/whoami
  20. environment:
  21. - VIRTUAL_HOST=whoami.local