Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This file containers the "ingress" point: the "nginx" container binds to 80 and 443 on the host.
- # The `nginx-proxy` network must exist before `docker-compose up` is called.
- version: "2"
- services:
- nginx:
- restart: always
- image: nginx
- container_name: nginx
- ports:
- - "80:80"
- - "443:443"
- volumes:
- - "./volumes/proxy/conf.d:/etc/nginx/conf.d"
- - "/etc/nginx/vhost.d"
- - "/usr/share/nginx/html"
- - "./volumes/proxy/certs:/etc/nginx/certs:ro"
- nginx-gen:
- restart: always
- image: jwilder/docker-gen
- container_name: nginx-gen
- volumes:
- - "/var/run/docker.sock:/tmp/docker.sock:ro"
- - "./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro"
- volumes_from:
- - nginx
- entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
- environment:
- - DEFAULT_HOST=defaultcontainer.hostname
- letsencrypt-nginx-proxy-companion:
- restart: always
- image: jrcs/letsencrypt-nginx-proxy-companion
- container_name: letsencrypt-nginx-proxy-companion
- volumes_from:
- - nginx
- volumes:
- - "/var/run/docker.sock:/var/run/docker.sock:ro"
- - "./volumes/proxy/certs:/etc/nginx/certs:rw"
- environment:
- - NGINX_DOCKER_GEN_CONTAINER=nginx-gen
- networks:
- default:
- external:
- name: nginx-proxy
Add Comment
Please, Sign In to add comment