nginx-proxy/docker-compose.yml

34 lines
722 B
YAML
Raw Normal View History

2020-11-29 11:33:31 +00:00
version: "2"
2019-05-28 08:32:43 +00:00
services:
nginx:
image: nginx
2023-08-23 14:55:13 +00:00
container_name: nginx_proxy
2023-06-04 19:07:13 +00:00
restart: always
2019-05-28 08:32:43 +00:00
ports:
- "80:80"
- "443:443"
volumes:
- /var/www
- /etc/nginx/conf.d
- /etc/letsencrypt:/etc/letsencrypt:ro
2023-08-25 07:04:32 +00:00
- ./vhost.d:/etc/nginx/vhost.d:ro
2020-11-29 11:33:31 +00:00
2019-05-28 08:32:43 +00:00
dockergen:
2023-06-04 19:07:13 +00:00
image: jwilder/docker-gen:latest
2019-05-28 08:32:43 +00:00
restart: always
depends_on:
- nginx
command: -notify-sighup nginx_proxy -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
volumes_from:
- nginx
volumes:
2023-06-04 19:07:13 +00:00
- ./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
2019-05-28 08:32:43 +00:00
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
default:
2023-06-04 19:07:13 +00:00
name: nginxproxy
2023-08-25 07:04:32 +00:00
external: true