jlesage / docker-nginx-proxy-manager

Docker container for Nginx Proxy Manager
MIT License
756 stars 166 forks source link

[Bug] Deleting certificate blocks the application #322

Open toteto opened 1 month ago

toteto commented 1 month ago

Current Behavior

I have deleted a certificate while still being attached to a host. Turns out you should not do this as it will block the app.

Currently the docker container prints this logs

Expected Behavior

Steps To Reproduce

No response

Environment

Container creation

name: nginxproxymanager
services:
  nginxproxymanager:
    cpu_shares: 90
    command: []
    container_name: nginxproxymanager
    deploy:
      resources:
        limits:
          memory: 1846M
        reservations:
          memory: "134217728"
    hostname: nginxproxymanager
    image: jc21/nginx-proxy-manager:2.11.2
    labels:
      icon: https://cdn.jsdelivr.net/gh/IceWhaleTech/CasaOS-AppStore@main/Apps/NginxProxyManager/icon.png
    ports:
      - target: 80
        published: "80"
        protocol: tcp
      - target: 443
        published: "443"
        protocol: tcp
      - target: 81
        published: "81"
        protocol: tcp
    restart: unless-stopped
    volumes:
      - type: bind
        source: /DATA/AppData/nginxproxymanager/data
        target: /data
      - type: bind
        source: /DATA/AppData/nginxproxymanager/etc/letsencrypt
        target: /etc/letsencrypt
    devices: []
    cap_add: []
    environment: []
    network_mode: bridge
    privileged: false

Container log

nginxproxymanager  | ❯ Starting nginx ...
nginxproxymanager  | nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/npm-6/fullchain.pem": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/letsencrypt/live/npm-6/fullchain.pem, r) error:10000080:BIO routines::no such file)

Container inspect

No response

Anything else?

Related to #224, but I cannot find the mentioned files for me to restore them. I have un-blocked the app by adding dummy certs in the missing places.