How i can you with docker-gen
meodemsao opened this issue · 0 comments
meodemsao commented
I try use this with docker-gen https://github.com/jwilder/docker-gen
version: '3'
services:
nginx-web:
build:
context: .
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
container_name: ${NGINX_WEB:-nginx-web}
restart: always
ports:
- "${IP:-0.0.0.0}:${DOCKER_HTTP:-80}:80"
- "${IP:-0.0.0.0}:${DOCKER_HTTPS:-443}:443"
volumes:
- ${NGINX_FILES_PATH:-./data}/conf.d:/etc/nginx/conf.d
- ${NGINX_FILES_PATH:-./data}/vhost.d:/usr/local/openresty/nginx/vhost.d
- ${NGINX_FILES_PATH:-./data}/html:/usr/share/nginx/html
- ${NGINX_FILES_PATH:-./data}/certs:/usr/local/openresty/nginx/certs:ro
- ${NGINX_FILES_PATH:-./data}/htpasswd:/usr/local/openresty/nginx/htpasswd:ro
- ./nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf
- ./lua:/lua/src
logging:
driver: ${NGINX_WEB_LOG_DRIVER:-json-file}
options:
max-size: ${NGINX_WEB_LOG_MAX_SIZE:-4m}
max-file: ${NGINX_WEB_LOG_MAX_FILE:-10}
depends_on:
- redis_cluster
links:
- redis_cluster
nginx-gen:
image: jwilder/docker-gen
command: -notify-sighup ${NGINX_WEB:-nginx-web} -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
container_name: ${DOCKER_GEN:-nginx-gen}
restart: always
environment:
SSL_POLICY: ${SSL_POLICY:-Mozilla-Intermediate}
volumes:
- ${NGINX_FILES_PATH:-./data}/conf.d:/etc/nginx/conf.d
- ${NGINX_FILES_PATH:-./data}/vhost.d:/etc/nginx/vhost.d
- ${NGINX_FILES_PATH:-./data}/html:/usr/share/nginx/html
- ${NGINX_FILES_PATH:-./data}/certs:/etc/nginx/certs:ro
- ${NGINX_FILES_PATH:-./data}/htpasswd:/etc/nginx/htpasswd:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
logging:
driver: ${NGINX_GEN_LOG_DRIVER:-json-file}
options:
max-size: ${NGINX_GEN_LOG_MAX_SIZE:-2m}
max-file: ${NGINX_GEN_LOG_MAX_FILE:-10}
But all domain alway response to default openresty
Any body have any solution ?