+use vhost.d when needed to change special config things
This commit is contained in:
parent
5a67b16ac9
commit
8aa947ecec
2 changed files with 10 additions and 5 deletions
|
@ -24,9 +24,10 @@ nginx_proxy_docker_socket: "/var/run/docker.sock"
|
|||
nginx_proxy_docker_compose_template: "templates/docker-compose.yml.j2"
|
||||
nginx_proxy_nginx_tmpl_url: "https://raw.githubusercontent.com/nginx-proxy/nginx-proxy/refs/heads/main/nginx.tmpl"
|
||||
nginx_proxy_folders:
|
||||
- "{{ nginx_proxy_base_dir }}"
|
||||
- "{{ nginx_proxy_base_dir }}"
|
||||
- "{{ nginx_proxy_base_dir }}/certs"
|
||||
- "{{ nginx_proxy_base_dir }}/conf.d"
|
||||
- "{{ nginx_proxy_base_dir }}/html"
|
||||
- "{{ nginx_proxy_base_dir }}/vhost.d"
|
||||
nginx_proxy_copy_files: []
|
||||
ansible_become: true
|
|
@ -8,9 +8,10 @@ services:
|
|||
- "{{ port }}"
|
||||
{% endfor %}
|
||||
volumes:
|
||||
- {{ nginx_proxy_base_dir }}/conf.d:/etc/nginx/conf.d
|
||||
- {{ nginx_proxy_base_dir }}/html:/usr/share/nginx/html
|
||||
- {{ nginx_proxy_base_dir }}/conf.d:/etc/nginx/conf.d:ro
|
||||
- {{ nginx_proxy_base_dir }}/html:/usr/share/nginx/html:ro
|
||||
- {{ nginx_proxy_base_dir }}/certs:/etc/nginx/certs:ro
|
||||
- {{ nginx_proxy_base_dir }}/vhost.d:/etc/nginx/vhost.d:ro
|
||||
environment:
|
||||
{% for key, value in nginx_proxy_nginx_env_vars.items() %}
|
||||
- "{{ key }}={{ value }}"
|
||||
|
@ -21,11 +22,13 @@ services:
|
|||
image: {{ nginx_proxy_docker_gen_container_image }}:{{ nginx_proxy_docker_gen_container_image_tag }}
|
||||
container_name: {{ nginx_proxy_container_name }}-gen
|
||||
command: -notify-sighup {{ nginx_proxy_container_name }} -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
|
||||
volumes_from:
|
||||
- nginx-proxy
|
||||
volumes:
|
||||
- {{ nginx_proxy_base_dir }}/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
|
||||
- {{ nginx_proxy_docker_socket }}:/tmp/docker.sock:ro
|
||||
- {{ nginx_proxy_base_dir }}/conf.d:/etc/nginx/conf.d:ro
|
||||
- {{ nginx_proxy_base_dir }}/html:/usr/share/nginx/html:ro
|
||||
- {{ nginx_proxy_base_dir }}/certs:/etc/nginx/certs:ro
|
||||
- {{ nginx_proxy_base_dir }}/vhost.d:/etc/nginx/vhost.d:ro
|
||||
labels:
|
||||
- "com.github.nginx-proxy.docker-gen"
|
||||
environment:
|
||||
|
@ -37,4 +40,5 @@ services:
|
|||
networks:
|
||||
default:
|
||||
name: {{ nginx_proxy_network }}
|
||||
enable_ipv6: {{ nginx_proxy_network_enable_ipv6 }}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue