docker-compose.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. version: '3'
  2. services:
  3. reverse:
  4. image: nginx
  5. labels:
  6. com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
  7. container_name: reverse
  8. restart: unless-stopped
  9. ports:
  10. - "80:80"
  11. - "443:443"
  12. volumes:
  13. - ./conf.d:/etc/nginx/conf.d
  14. - ./vhost.d:/etc/nginx/vhost.d
  15. - ./html:/usr/share/nginx/html
  16. - ./certs:/etc/nginx/certs:ro
  17. reverse-gen:
  18. image: jwilder/docker-gen
  19. command: -notify-sighup reverse -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
  20. container_name: reverse-gen
  21. restart: unless-stopped
  22. volumes:
  23. - ./conf.d:/etc/nginx/conf.d
  24. - ./vhost.d:/etc/nginx/vhost.d
  25. - ./html:/usr/share/nginx/html
  26. - ./certs:/etc/nginx/certs:ro
  27. - /var/run/docker.sock:/tmp/docker.sock:ro
  28. - ./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
  29. reverse-letsencrypt:
  30. image: jrcs/letsencrypt-nginx-proxy-companion
  31. container_name: reverse-letsencrypt
  32. restart: unless-stopped
  33. volumes:
  34. - ./conf.d:/etc/nginx/conf.d
  35. - ./vhost.d:/etc/nginx/vhost.d
  36. - ./html:/usr/share/nginx/html
  37. - ./certs:/etc/nginx/certs:rw
  38. - /var/run/docker.sock:/var/run/docker.sock:ro
  39. environment:
  40. NGINX_DOCKER_GEN_CONTAINER: "reverse-gen"
  41. NGINX_PROXY_CONTAINER: "reverse"
  42. networks:
  43. default:
  44. external:
  45. name: reverse-proxy