Coder Social home page Coder Social logo

letsencrypt-nginx-proxy-companion-compose's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

letsencrypt-nginx-proxy-companion-compose's Issues

Pi-hole / Three Container Setup

Hello Buchdag,

I hope you can help me with this problem. I am using the "three containers/compose-v3/labels"-setup you provided. It is a great setup, thanks to you!
It works fine with other kinds of projects, but when i tried to run Pi-hole behind it, Pi-hole crashed with the following output, even though I'am using the DEFAULT_HOST environment variable:

Removing pihole
Recreating d09f715ad0ee_pihole ...
Recreating d09f715ad0ee_pihole ... error

ERROR: for d09f715ad0ee_pihole  Cannot start service pihole: driver failed programming external connectivity on endpoint pihole (f99813b9aca1b4dce45dfc05fc7c52ca6685ea7e0d981e2d557786e3e258a529): Bind for 0.0.0.0:443 failed: port is already allocated

ERROR: for pihole  Cannot start service pihole: driver failed programming external connectivity on endpoint pihole (f99813b9aca1b4dce45dfc05fc7c52ca6685ea7e0d981e2d557786e3e258a529): Bind for 0.0.0.0:443 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.

After trying many different ways of fixing this error, my last attempt was to use the basic/standard "jwilder/nginx-proxy" and et voilà it worked... :(
So I think I am missing somthing little, but I can't find it.

My ReverseProxy (based on your example) looks like this:

version: '3'
services:
  reverseproxy-nginx:
    image: nginx
    container_name: reverseproxy-nginx
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - conf:/etc/nginx/conf.d
      - vhost:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - certs:/etc/nginx/certs:ro
    labels:
      - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
    environment:
      - TZ=Europe/Berlin
    restart: always

  reverseproxy-dockergen:
    image: jwilder/docker-gen
    command: -notify-sighup reverseproxy-nginx -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
    container_name: reverseproxy-dockergen
    depends_on:
      - reverseproxy-nginx
    volumes:
      - conf:/etc/nginx/conf.d
      - vhost:/etc/nginx/vhost.d
      - certs:/etc/nginx/certs:ro
      - ./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
      - /var/run/docker.sock:/tmp/docker.sock:ro
    labels:
      - "com.github.jrcs.letsencrypt_nginx_proxy_companion.docker_gen"
    environment:
      - TZ=Europe/Berlin
      - DEFAULT_HOST=pihole.myadress.com
    restart: always

  reverseproxy-letsencrypt-companion:
    image: jrcs/letsencrypt-nginx-proxy-companion:latest
    container_name: reverseproxy-letsencrypt-companion
    depends_on:
      - reverseproxy-nginx
      - reverseproxy-dockergen
    volumes:
      - vhost:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - certs:/etc/nginx/certs
      - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
      - TZ=Europe/Berlin
    restart: always

volumes:
  conf:
  vhost:
  html:
  certs:

networks:
  default:
    external:
      name: nginx-reverseproxy

My Pi-hole docker-compose.yml looks like this:

version: '3'

# https://github.com/pi-hole/docker-pi-hole/blob/master/README.md

services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    # For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "67:67/udp"
      - "80:80/tcp"
      - "443:443/tcp"
    environment:
      - TZ=Europe/Berlin
      - WEBPASSWORD=ReallySecurePasswordForPiHole
      - ServerIP=10.10.10.50
      - VIRTUAL_HOST=pihole.myadress.com
      - VIRTUAL_PORT=80
      - LETSENCRYPT_HOST=pihole.myadress.com
      - [email protected]
    # Volumes store your data between container upgrades
    volumes:
      - './etc-pihole/:/etc/pihole/'
      - './etc-dnsmasq.d/:/etc/dnsmasq.d/'
      # run `touch ./var-log/pihole.log` first unless you like errors
      # - './var-log/pihole.log:/var/log/pihole.log'
    dns:
      - 127.0.0.1
      - 1.1.1.1
    # Recommended but not required (DHCP needs NET_ADMIN)
    #   https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
    #cap_add:
    #  - NET_ADMIN
    restart: always

networks:
  default:
    external:
      name: nginx-reverseproxy

I would appreciate any hint and/or help.
Thanks in advance!

Automatic port forwarding

Dear @buchdag,

i would like to come back to our discussion here:
buchdag/multiarch-letsencrypt-nginx-proxy#7 (comment)
I had no time till now thatswhy the late response.

I created now a script which i would like to place as well in the lets encrypt container and execute before the renewal start (to open the port forwarding) and again after the renewal was successfully (to close the port forwarding).

The only thing what i would like to know, is in which file/script and line exactly would you suggest to place in your scripts these explained execution command to run my script?

Thanks and Greetings

Daniel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.