jlesage / docker-nginx-proxy-manager

Docker container for Nginx Proxy Manager
MIT License
784 stars 177 forks source link

[Bug] Provide a short description of the bug here #295

Closed RR-Helpdesk closed 11 months ago

RR-Helpdesk commented 1 year ago

Current Behavior

When using a mysql database is there anyway to disable it from deleting the existing database & resetting the data anything you recreate the container?

Expected Behavior

No response

Steps To Reproduce

No response

Environment

Container creation

    "image": "jlesage/nginx-proxy-manager",
    "hostname": "nginx-proxy-manager",
    "ports": ["80:8080/tcp", "81:8181/tcp", "443:4443/tcp"],
    "network": "docweb",
    "restart_policy": "unless-stopped",
    "volumes": [ 
      { "container": "/data","bind":"/opt/docker/app_data/nginx-proxy/data" },
      { "container": "/etc/letsencrypt","bind":"/opt/docker/app_data/nginx-proxy/letsencrypt" }
],
"healthcheck": {
      "test": [ "CMD", "/bin/check-health"],
        "interval": "10s",
        "timeout": "3s"
     }
  },

Container log

[app         ] [6/8/2023] [12:13:37 PM] [Migrate  ] › ℹ  info      [settings] Migrating Up...
[app         ] [6/8/2023] [12:13:37 PM] [Migrate  ] › ℹ  info      [settings] setting Table created
[app         ] [6/8/2023] [12:13:37 PM] [Migrate  ] › ℹ  info      [access_list_client] Migrating Up...
[app         ] [6/8/2023] [12:13:37 PM] [Migrate  ] › ℹ  info      [access_list_client] access_list_client Table created
[app         ] [6/8/2023] [12:13:37 PM] [Migrate  ] › ℹ  info      [access_list_client] access_list Table altered
[app         ] [6/8/2023] [12:13:37 PM] [Migrate  ] › ℹ  info      [access_list_client_fix] Migrating Up...
[app         ] [6/8/2023] [12:13:37 PM] [Migrate  ] › ℹ  info      [access_list_client_fix] access_list Table altered
[app         ] [6/8/2023] [12:13:37 PM] [Migrate  ] › ℹ  info      [pass_auth] Migrating Up...
[app         ] [6/8/2023] [12:13:37 PM] [Migrate  ] › ℹ  info      [pass_auth] access_list Table altered
[app         ] [6/8/2023] [12:13:37 PM] [Migrate  ] › ℹ  info      [redirection_scheme] Migrating Up...
[app         ] [6/8/2023] [12:13:37 PM] [Migrate  ] › ℹ  info      [redirection_scheme] redirection_host Table altered
[app         ] [6/8/2023] [12:13:37 PM] [Migrate  ] › ℹ  info      [redirection_status_code] Migrating Up...
[app         ] [6/8/2023] [12:13:37 PM] [Migrate  ] › ℹ  info      [redirection_status_code] redirection_host Table altered
[app         ] [6/8/2023] [12:13:37 PM] [Migrate  ] › ℹ  info      [stream_domain] Migrating Up...
[app         ] [6/8/2023] [12:13:37 PM] [Migrate  ] › ℹ  info      [stream_domain] stream Table altered
[app         ] [6/8/2023] [12:13:37 PM] [Migrate  ] › ℹ  info      [stream_domain] Migrating Up...
[app         ] [6/8/2023] [12:13:37 PM] [Setup    ] › ℹ  info      Creating a new JWT key pair...
[app         ] [6/8/2023] [12:13:58 PM] [Setup    ] › ℹ  info      Wrote JWT key pair to config file: /opt/nginx-proxy-manager/config/production.json
[app         ] [6/8/2023] [12:13:59 PM] [Setup    ] › ℹ  info      Creating a new user: admin@example.com with password: changeme
[app         ] [6/8/2023] [12:14:02 PM] [Setup    ] › ℹ  info      Initial admin setup completed
[app         ] [6/8/2023] [12:14:02 PM] [Setup    ] › ℹ  info      Default settings added
[app         ] [6/8/2023] [12:14:02 PM] [Setup    ] › ℹ  info      Logrotate Timer initialized
[app         ] [6/8/2023] [12:14:02 PM] [Setup    ] › ℹ  info      Logrotate completed.
[app         ] [6/8/2023] [12:14:02 PM] [IP Ranges] › ℹ  info      Fetching IP Ranges from online services...
[app         ] [6/8/2023] [12:14:02 PM] [IP Ranges] › ℹ  info      Fetching https://ip-ranges.amazonaws.com/ip-ranges.json
[app         ] [6/8/2023] [12:14:02 PM] [IP Ranges] › ℹ  info      Fetching https://www.cloudflare.com/ips-v4
[app         ] [6/8/2023] [12:14:03 PM] [IP Ranges] › ℹ  info      Fetching https://www.cloudflare.com/ips-v6
[app         ] [6/8/2023] [12:14:03 PM] [SSL      ] › ℹ  info      Let's Encrypt Renewal Timer initialized
[app         ] [6/8/2023] [12:14:03 PM] [SSL      ] › ℹ  info      Renewing SSL certs close to expiry...
[app         ] [6/8/2023] [12:14:03 PM] [IP Ranges] › ℹ  info      IP Ranges Renewal Timer initialized
[app         ] [6/8/2023] [12:14:03 PM] [Global   ] › ℹ  info      Backend PID 403 listening on port 3000 ...
[app         ] [6/8/2023] [12:14:10 PM] [Nginx    ] › ℹ  info      Reloading Nginx
[app         ] [6/8/2023] [12:14:10 PM] [SSL      ] › ℹ  info      Renew Complete

Container inspect

{
    "AppArmorProfile": "docker-default",
    "Args": [],
    "Config": {
        "AttachStderr": false,
        "AttachStdin": false,
        "AttachStdout": false,
        "Cmd": [
            "/init"
        ],
        "Domainname": "",
        "Entrypoint": null,
        "Env": [
            "SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock",
            "DB_MYSQL_HOST=mariadb",
            "DB_MYSQL_PORT=3306",
            "DB_MYSQL_USER=nginxproxy",
            "DB_MYSQL_PASSWORD=REDACTED",
            "DB_MYSQL_NAME=nginxproxydb",
            "PUID=1000",
            "PGID=1000",
            "TZ=America/Los_Angeles",
            "DISABLE_IPV6=false",
            "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/base/sbin:/opt/base/bin",
            "ENV=/root/.docker_rc",
            "USER_ID=1000",
            "GROUP_ID=1000",
            "SUP_GROUP_IDS=",
            "UMASK=0022",
            "LANG=en_US.UTF-8",
            "KEEP_APP_RUNNING=0",
            "APP_NICENESS=0",
            "INSTALL_PACKAGES=",
            "CONTAINER_DEBUG=0"
        ],
        "ExposedPorts": {
            "4443/tcp": {},
            "8080/tcp": {},
            "8181/tcp": {}
        },
        "Hostname": "nginx-proxy-manager",
        "Image": "jlesage/nginx-proxy-manager:latest",
        "Labels": {
            "org.label-schema.description": "Docker container for Nginx Proxy Manager",
            "org.label-schema.name": "nginx-proxy-manager",
            "org.label-schema.schema-version": "1.0",
            "org.label-schema.vcs-url": "https://github.com/jlesage/docker-nginx-proxy-manager",
            "org.label-schema.version": "23.04.1"
        },
        "OnBuild": null,
        "OpenStdin": false,
        "StdinOnce": false,
        "Tty": false,
        "User": "",
        "Volumes": {
            "/config": {},
            "/data": {},
            "/etc/letsencrypt": {}
        },
        "WorkingDir": "/tmp"
    },
    "Created": "2023-06-08T19:07:56.938145046Z",
    "Driver": "overlay2",
    "ExecIDs": null,
    "GraphDriver": {
        "Data": {
            "LowerDir": "/var/lib/docker/overlay2/3fff125c92768a850c086e731602b6040f908867486a3ad04df6bf745f21c4f4-init/diff:/var/lib/docker/overlay2/920924d6878e385c3afa81b41416c5a1115a25082da2001289503bb086ca5cea/diff:/var/lib/docker/overlay2/d7fc871ba7538c12ab5f899cfbf5931b14b154f2d9d937758e1f00fe1901d0f0/diff:/var/lib/docker/overlay2/c782871c45bb71a77a9b318923859e574f424efc6a8836b5940ba8ff3e3fa4e4/diff:/var/lib/docker/overlay2/2aa161d0d5eeaf9bde69544ee0e8379c9a17d53da60d6e112d726467073a2841/diff:/var/lib/docker/overlay2/e8ab454dd6dea88f2d3b9aa8dbd909091d39f18b6b259f5eb2e7f4e5d883bd54/diff:/var/lib/docker/overlay2/80d900d68e4c05ba281b14ee72d163aee01f9b752bc0f74d7c7be6b1a5b70faa/diff:/var/lib/docker/overlay2/baf6b48ced10d4ddf2bbca16a91670329d8aa8ac461d9564e445f49794147426/diff:/var/lib/docker/overlay2/4030a0bf2d0bba11084c5fd36239763c43a96e4ff3c6b298c0d37b3ba84803b6/diff:/var/lib/docker/overlay2/a02364636e9a516b8c4d99599f25ecdfdaa8c10ac80220925ef1ead51cb8f7ce/diff:/var/lib/docker/overlay2/fd88a936b07bf7dd7c334fb1324f913a17987cae213df4e5b7f80696679dd4d0/diff:/var/lib/docker/overlay2/b9ba08fbae1f1afd16898883f660996d788bf1cabd235e0bcfded350ff3d905a/diff:/var/lib/docker/overlay2/073c7477bff162d1dceceda430d57e633cdde166ce794bdea5d967551366a272/diff:/var/lib/docker/overlay2/b9a9122390c8e19936a28a491d9aab1ca9344fbab01bc6644d2a50bc26cd0b49/diff:/var/lib/docker/overlay2/4a786b515e13da3c624d44bb8911f8c4255022b65c19ed3976f7bf9207ba66bf/diff:/var/lib/docker/overlay2/44fa31a255d79be6098419ef16c760c5608fc4d63482fdd13eab98b9022906ca/diff:/var/lib/docker/overlay2/9c89c547f26a82cafafd2d073f0b21c26c9e2e1a96045d7b677360b987ad4ecf/diff:/var/lib/docker/overlay2/cb7a73b45b04b28fa26f2821e506f45f5d81371ab033c7ea6c60532ac7cf1fd7/diff:/var/lib/docker/overlay2/1bc9813c370f0e504791318b5a5bee7fea83f7f88137b312c9aba1ff817bab5b/diff:/var/lib/docker/overlay2/43c56f1e053106893a4ee41330d355fa1ff38b73c3e475426a130b03dbd59de1/diff:/var/lib/docker/overlay2/26c89d729faa317a519e9ee4d506220cb323a1c8256c7635fd4af7de982e253b/diff",
            "MergedDir": "/var/lib/docker/overlay2/3fff125c92768a850c086e731602b6040f908867486a3ad04df6bf745f21c4f4/merged",
            "UpperDir": "/var/lib/docker/overlay2/3fff125c92768a850c086e731602b6040f908867486a3ad04df6bf745f21c4f4/diff",
            "WorkDir": "/var/lib/docker/overlay2/3fff125c92768a850c086e731602b6040f908867486a3ad04df6bf745f21c4f4/work"
        },
        "Name": "overlay2"
    },
    "HostConfig": {
        "AutoRemove": false,
        "Binds": [
            "/opt/docker/app_data/nginx-proxy/data:/data",
            "/opt/docker/app_data/nginx-proxy/letsencrypt:/etc/letsencrypt"
        ],
        "BlkioDeviceReadBps": null,
        "BlkioDeviceReadIOps": null,
        "BlkioDeviceWriteBps": null,
        "BlkioDeviceWriteIOps": null,
        "BlkioWeight": 0,
        "BlkioWeightDevice": null,
        "CapAdd": null,
        "CapDrop": null,
        "Cgroup": "",
        "CgroupParent": "",
        "CgroupnsMode": "private",
        "ConsoleSize": [
            0,
            0
        ],
        "ContainerIDFile": "",
        "CpuCount": 0,
        "CpuPercent": 0,
        "CpuPeriod": 0,
        "CpuQuota": 0,
        "CpuRealtimePeriod": 0,
        "CpuRealtimeRuntime": 0,
        "CpuShares": 0,
        "CpusetCpus": "",
        "CpusetMems": "",
        "DeviceCgroupRules": null,
        "DeviceRequests": null,
        "Devices": null,
        "Dns": null,
        "DnsOptions": null,
        "DnsSearch": null,
        "ExtraHosts": [
            "host.docker.internal:host-gateway"
        ],
        "GroupAdd": null,
        "IOMaximumBandwidth": 0,
        "IOMaximumIOps": 0,
        "IpcMode": "private",
        "Isolation": "",
        "Links": null,
        "LogConfig": {
            "Config": {},
            "Type": "json-file"
        },
        "MaskedPaths": [
            "/proc/asound",
            "/proc/acpi",
            "/proc/kcore",
            "/proc/keys",
            "/proc/latency_stats",
            "/proc/timer_list",
            "/proc/timer_stats",
            "/proc/sched_debug",
            "/proc/scsi",
            "/sys/firmware"
        ],
        "Memory": 0,
        "MemoryReservation": 0,
        "MemorySwap": 0,
        "MemorySwappiness": null,
        "NanoCpus": 0,
        "NetworkMode": "docweb",
        "OomKillDisable": null,
        "OomScoreAdj": 0,
        "PidMode": "",
        "PidsLimit": null,
        "PortBindings": {
            "4443/tcp": [
                {
                    "HostIp": "",
                    "HostPort": "443"
                }
            ],
            "8080/tcp": [
                {
                    "HostIp": "",
                    "HostPort": "80"
                }
            ],
            "8181/tcp": [
                {
                    "HostIp": "",
                    "HostPort": "81"
                }
            ]
        },
        "Privileged": false,
        "PublishAllPorts": false,
        "ReadonlyPaths": [
            "/proc/bus",
            "/proc/fs",
            "/proc/irq",
            "/proc/sys",
            "/proc/sysrq-trigger"
        ],
        "ReadonlyRootfs": false,
        "RestartPolicy": {
            "MaximumRetryCount": 0,
            "Name": "unless-stopped"
        },
        "Runtime": "runc",
        "SecurityOpt": null,
        "ShmSize": 67108864,
        "UTSMode": "",
        "Ulimits": null,
        "UsernsMode": "",
        "VolumeDriver": "",
        "VolumesFrom": null
    },
    "HostnamePath": "/var/lib/docker/containers/5283ccbc59dde62b03da1cdc4e7554a78577e4cb58164fa7e4324b87995db72f/hostname",
    "HostsPath": "/var/lib/docker/containers/5283ccbc59dde62b03da1cdc4e7554a78577e4cb58164fa7e4324b87995db72f/hosts",
    "Id": "5283ccbc59dde62b03da1cdc4e7554a78577e4cb58164fa7e4324b87995db72f",
    "Image": "sha256:5b731ea294fde3d468aa42bc09fee2d1af4ac3d17a964bb1765101e1093e4356",
    "LogPath": "/var/lib/docker/containers/5283ccbc59dde62b03da1cdc4e7554a78577e4cb58164fa7e4324b87995db72f/5283ccbc59dde62b03da1cdc4e7554a78577e4cb58164fa7e4324b87995db72f-json.log",
    "MountLabel": "",
    "Mounts": [
        {
            "Destination": "/data",
            "Mode": "",
            "Propagation": "rprivate",
            "RW": true,
            "Source": "/opt/docker/app_data/nginx-proxy/data",
            "Type": "bind"
        },
        {
            "Destination": "/etc/letsencrypt",
            "Mode": "",
            "Propagation": "rprivate",
            "RW": true,
            "Source": "/opt/docker/app_data/nginx-proxy/letsencrypt",
            "Type": "bind"
        },
        {
            "Destination": "/config",
            "Driver": "local",
            "Mode": "",
            "Name": "ffa5ea7628229913ccfb6d4326b70a0a7df5d79ed526511cec49c720892b4219",
            "Propagation": "",
            "RW": true,
            "Source": "/var/lib/docker/volumes/ffa5ea7628229913ccfb6d4326b70a0a7df5d79ed526511cec49c720892b4219/_data",
            "Type": "volume"
        }
    ],
    "Name": "/nginx-proxy-manager",
    "NetworkSettings": {
        "Bridge": "",
        "EndpointID": "",
        "Gateway": "",
        "GlobalIPv6Address": "",
        "GlobalIPv6PrefixLen": 0,
        "HairpinMode": false,
        "IPAddress": "",
        "IPPrefixLen": 0,
        "IPv6Gateway": "",
        "LinkLocalIPv6Address": "",
        "LinkLocalIPv6PrefixLen": 0,
        "MacAddress": "",
        "Networks": {
            "docweb": {
                "Aliases": [
                    "5283ccbc59dd",
                    "nginx-proxy-manager"
                ],
                "DriverOpts": null,
                "EndpointID": "605c524b9df4f22c6e65757370579de8cd7387af6596952dc437e5575ccfc8da",
                "Gateway": "",
                "GlobalIPv6Address": "",
                "GlobalIPv6PrefixLen": 0,
                "IPAMConfig": {
                    "IPv4Address": "10.0.2.183"
                },
                "IPAddress": "10.0.2.183",
                "IPPrefixLen": 24,
                "IPv6Gateway": "",
                "Links": null,
                "MacAddress": "02:42:0a:00:02:b7",
                "NetworkID": "4ql75k0yn5gywjpz91mhgp058"
            }
        },
        "Ports": {
            "4443/tcp": [
                {
                    "HostIp": "0.0.0.0",
                    "HostPort": "443"
                },
                {
                    "HostIp": "::",
                    "HostPort": "443"
                }
            ],
            "8080/tcp": [
                {
                    "HostIp": "0.0.0.0",
                    "HostPort": "80"
                },
                {
                    "HostIp": "::",
                    "HostPort": "80"
                }
            ],
            "8181/tcp": [
                {
                    "HostIp": "0.0.0.0",
                    "HostPort": "81"
                },
                {
                    "HostIp": "::",
                    "HostPort": "81"
                }
            ]
        },
        "SandboxID": "ee6d0c86a84d7dabccb145da3b7af367ac91ad0e8c526c6393c031c5e1f3ee04",
        "SandboxKey": "/var/run/docker/netns/ee6d0c86a84d",
        "SecondaryIPAddresses": null,
        "SecondaryIPv6Addresses": null
    },
    "Path": "/init",
    "Platform": "linux",
    "Portainer": {
        "ResourceControl": {
            "Id": 46,
            "ResourceId": "5283ccbc59dde62b03da1cdc4e7554a78577e4cb58164fa7e4324b87995db72f",
            "SubResourceIds": [],
            "Type": 1,
            "UserAccesses": [],
            "TeamAccesses": [],
            "Public": false,
            "AdministratorsOnly": true,
            "System": false
        }
    },
    "ProcessLabel": "",
    "ResolvConfPath": "/var/lib/docker/containers/5283ccbc59dde62b03da1cdc4e7554a78577e4cb58164fa7e4324b87995db72f/resolv.conf",
    "RestartCount": 0,
    "State": {
        "Dead": false,
        "Error": "",
        "ExitCode": 0,
        "FinishedAt": "0001-01-01T00:00:00Z",
        "OOMKilled": false,
        "Paused": false,
        "Pid": 2980759,
        "Restarting": false,
        "Running": true,
        "StartedAt": "2023-06-08T19:07:58.449873984Z",
        "Status": "running"
    }
}

Anything else?

See above

jlesage commented 1 year ago

I think you are not using the correct image. Looks like you configured the container for the jc21's image (jc21/nginx-proxy-manager). Project for the jc21 image is there: https://github.com/NginxProxyManager/nginx-proxy-manager