lemariva / haproxy-certbot

A Dockerized service that adds SSL layer (reverse proxy) and automatically renews the SSL certificate when needed.
https://lemariva.com/blog/2022/01/home-assistant-help-tips-tricks-diy-smart-home
Apache License 2.0
3 stars 0 forks source link

haproxy-certbot keeps restarting endlessly #2

Open Geek-MD opened 1 year ago

Geek-MD commented 1 year ago

Sorry to bother you, but haproxy-certbot keeps restarting endlessly. I've created the container using docker-compose file and env variables.

This is the result of "docker ps" command

c1435e93b3bc   lemariva/haproxy-certbot:1.1.2-SNAPSHOT        "/usr/bin/entry.sh /…"   27 minutes ago   Restarting (1) 3 seconds ago             haproxy-certbot

My "docker-compose.yaml" file is this

version: "3.8"
services:
  haproxy:
    restart: unless-stopped
    container_name: ${LOAD_BALANCER_NAME}
    image: ${DOCKER_REPO}/haproxy-certbot:${VERSION}
    volumes:
     - ./haproxy/config:/config
     - ./haproxy/letsencrypt:/etc/letsencrypt
     - ./haproxy/certs.d:/usr/local/etc/haproxy/certs.d
    ports:
     - "80:80"
     - "443:443"
     - "9999:9999"
    cap_add:
     - NET_ADMIN
    environment:
      HTTP_PORT: 80
      HTTPS_PORT: 443
      FORCE_HTTPS_REDIRECT: "true"
      SERVICE_IP: 192.168.4.50
      SERVICE_PORT: 8123

And to create the container I use

docker-compose --env-file ../docker.env up -d

Please help. Thanks in advance.

Geek-MD commented 1 year ago

Some additional information, that may be useful

emontes@montesdelpino:~/docker/haproxy-certbot $ docker --version
Docker version 24.0.2, build cb74dfc
emontes@montesdelpino:~/docker/haproxy-certbot $ docker-compose --version
docker-compose version 1.29.2, build unknown
emontes@montesdelpino:~/docker/haproxy-certbot $ uname -a
Linux montesdelpino 6.1.21-v7+ #1642 SMP Mon Apr  3 17:20:52 BST 2023 armv7l GNU/Linux
emontes@montesdelpino:~/docker/haproxy-certbot $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"