Nginx: runsv not running
Description of problem
I have a fresh install of dokku installed via docker on my server. I am attempting to deploy an app using a Dockerfile. I want the app container to exist on a custom network. The build seems to succeed but the app is not routable via the dokku host. I can visit the app if I set up a separate reverse proxy pointing at the app container.
If I try to run dokku nginx:start I get:
fail: nginx: runsv not running
I think in the nginx config it is using the ip address from the default bridge network which seems like it would not work but I have tried manually changing it but it seems like nginx not starting is not related?
Steps to reproduce
I have a docker container running with the following compose config:
dokku:
image: dokku/dokku
container_name: dokku
restart: unless-stopped
environment:
DOKKU_HOSTNAME: "run.my.domain"
DOKKU_HOST_ROOT: "/srv/dokku/home/dokku"
DOKKU_LIB_HOST_ROOT: "/srv/dokku/var/lib/dokku"
volumes:
- "/srv/dokku:/mnt/dokku"
- /var/run/docker.sock:/var/run/docker.sock
networks:
- all
Once the container was running I ran the following commands:
dokku plugin:install
echo "<public key>" | dokku ssh-keys:add personal
dokku network:set --global attach-post-create all
I then deployed my app with:
dokku apps:create website
git remote add dokku [email protected]:website
git push dokku main
Which succeeds. I then navigate to website.my.domain and the site is unavailable.
dokku report $APP_NAME
-----> uname: Linux 55d93007529a 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux -----> memory: total used free shared buff/cache available Mem: 15619 5504 768 453 9345 9324 Swap: 0 0 0 -----> disk utilization: Filesystem Size Used Avail Use% Mounted on /dev/sda1 150G 81G 64G 56% /mnt/dokku -----> disk inode utilization: Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sda1 9.3M 1.2M 8.2M 13% /mnt/dokku -----> docker version: Client: Docker Engine - Community Version: 27.1.2 API version: 1.41 (downgraded from 1.46) Go version: go1.21.13 Git commit: d01f264 Built: Mon Aug 12 11:51:03 2024 OS/Arch: linux/amd64 Context: default
Server: Docker Engine - Community
Engine:
Version: 20.10.17
API version: 1.41 (minimum version 1.12)
Go version: go1.17.11
Git commit: a89b842
Built: Mon Jun 6 23:01:03 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.7
GitCommit: 0197261a30bf81f1ee8e6a4dd2dea0ef95d67ccb
runc:
Version: 1.1.3
GitCommit: v1.1.3-0-g6724737
docker-init:
Version: 0.19.0
GitCommit: de40ad0
-----> docker daemon info: Client: Docker Engine - Community Version: 27.1.2 Context: default Debug Mode: true Plugins: buildx: Docker Buildx (Docker Inc.) Version: v0.16.2 Path: /usr/libexec/docker/cli-plugins/docker-buildx compose: Docker Compose (Docker Inc.) Version: v2.29.1 Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
WARNING: No swap limit support Containers: 45 Running: 43 Paused: 0 Stopped: 2 Images: 83 Server Version: 20.10.17 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true userxattr: false Logging Driver: json-file Cgroup Driver: cgroupfs Cgroup Version: 1 Plugins: Volume: local Network: bridge host ipvlan macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog Swarm: inactive Runtimes: runc io.containerd.runc.v2 io.containerd.runtime.v1.linux Default Runtime: runc Init Binary: docker-init containerd version: 0197261a30bf81f1ee8e6a4dd2dea0ef95d67ccb runc version: v1.1.3-0-g6724737 init version: de40ad0 Security Options: apparmor seccomp Profile: default Kernel Version: 5.4.0-182-generic Operating System: Ubuntu 20.04.6 LTS OSType: linux Architecture: x86_64 CPUs: 4 Total Memory: 15.25GiB Name: server ID: AYP4:NFHQ:GCWV:VGYR:VMMR:VJ2X:2V63:7UOU:DT3R:OWE6:L2PV:5VA7 Docker Root Dir: /var/lib/docker Debug Mode: false File Descriptors: 370 Goroutines: 302 System Time: 2024-08-27T11:43:13.39079717Z EventsListeners: 0 Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false
-----> herokuish version: ! Herokuish image gliderlabs/herokuish:latest-22 is not available -----> dokku version: dokku version 0.34.9 ! dokku-event-listener binary is not available ! dokku-update binary is not available -----> docker-container-healthchecker version: v0.11.0 -----> docker-image-labeler version: v0.8.0 -----> git version: git version 2.25.1 -----> lambda-builder version: v0.8.0 -----> netrc version: v0.10.0 ! No pack binary found -----> pack version: -----> plugn version: plugn: v0.16.0 -----> sigil version: v0.11.0 -----> sshcommand version: sshcommand v0.18.0 -----> dokku plugins: 00_dokku-standard 0.34.9 enabled dokku core standard plugin 20_events 0.34.9 enabled dokku core events logging plugin app-json 0.34.9 enabled dokku core app-json plugin apps 0.34.9 enabled dokku core apps plugin builder 0.34.9 enabled dokku core builder plugin builder-dockerfile 0.34.9 enabled dokku core builder-dockerfile plugin builder-herokuish 0.34.9 enabled dokku core builder-herokuish plugin builder-lambda 0.34.9 enabled dokku core builder-lambda plugin builder-nixpacks 0.34.9 enabled dokku core builder-nixpacks plugin builder-null 0.34.9 enabled dokku core builder-null plugin builder-pack 0.34.9 enabled dokku core builder-pack plugin buildpacks 0.34.9 enabled dokku core buildpacks plugin caddy-vhosts 0.34.9 enabled dokku core caddy-vhosts plugin certs 0.34.9 enabled dokku core certificate management plugin checks 0.34.9 enabled dokku core checks plugin common 0.34.9 enabled dokku core common plugin config 0.34.9 enabled dokku core config plugin cron 0.34.9 enabled dokku core cron plugin docker-options 0.34.9 enabled dokku core docker-options plugin domains 0.34.9 enabled dokku core domains plugin enter 0.34.9 enabled dokku core enter plugin git 0.34.9 enabled dokku core git plugin haproxy-vhosts 0.34.9 enabled dokku core haproxy-vhosts plugin logs 0.34.9 enabled dokku core logs plugin network 0.34.9 enabled dokku core network plugin nginx-vhosts 0.34.9 enabled dokku core nginx-vhosts plugin openresty-vhosts 0.34.9 enabled dokku core openresty-vhosts plugin plugin 0.34.9 enabled dokku core plugin plugin ports 0.34.9 enabled dokku core ports plugin proxy 0.34.9 enabled dokku core proxy plugin ps 0.34.9 enabled dokku core ps plugin registry 0.34.9 enabled dokku core registry plugin repo 0.34.9 enabled dokku core repo plugin resource 0.34.9 enabled dokku core resource plugin run 0.34.9 enabled dokku core run plugin scheduler 0.34.9 enabled dokku core scheduler plugin scheduler-docker-local 0.34.9 enabled dokku core scheduler-docker-local plugin scheduler-k3s 0.34.9 enabled dokku core scheduler-k3s plugin scheduler-null 0.34.9 enabled dokku core scheduler-null plugin shell 0.34.9 enabled dokku core shell plugin ssh-keys 0.34.9 enabled dokku core ssh-keys plugin storage 0.34.9 enabled dokku core storage plugin trace 0.34.9 enabled dokku core trace plugin traefik-vhosts 0.34.9 enabled dokku core traefik-vhosts plugin =====> website app-json information App json computed selected: app.json App json global selected: app.json App json selected: =====> website app information App created at: 1724756626 App deploy source: git-push App deploy source metadata: c615a184a81dcd76c18e78e96045e5182eb5eb4d App dir: /home/dokku/website App locked: false =====> website builder information Builder build dir: Builder computed build dir: Builder computed selected: Builder global build dir: Builder global selected: Builder selected: =====> website builder-dockerfile information Builder dockerfile computed dockerfile path: Dockerfile Builder dockerfile global dockerfile path: Dockerfile Builder dockerfile dockerfile path: =====> website builder-herokuish information Builder herokuish computed allowed: true Builder herokuish global allowed: true Builder herokuish allowed: =====> website builder-lambda information Builder lambda computed lambdayml path: lambda.yml Builder lambda global lambdayml path: lambda.yml Builder lambda lambdayml path: =====> website builder-nixpacks information Builder nixpacks computed nixpackstoml path: nixpacks.toml Builder nixpacks global nixpackstoml path: nixpacks.toml Builder nixpacks nixpackstoml path: Builder nixpacks computed no cache: false Builder nixpacks global no cache: false Builder nixpacks no cache: =====> website builder-pack information Builder pack computed projecttoml path: project.toml Builder pack global projecttoml path: project.toml Builder pack projecttoml path: =====> website buildpacks information Buildpacks computed stack: gliderlabs/herokuish:latest-22 Buildpacks global stack: Buildpacks list: Buildpacks stack: =====> website caddy information Caddy image: lucaslorentz/caddy-docker-proxy:2.9 Caddy letsencrypt email: Caddy letsencrypt server: https://acme-v02.api.letsencrypt.org/directory Caddy log level: ERROR Caddy polling interval: 5s Caddy tls internal: false =====> website ssl information Ssl dir: /home/dokku/website/tls Ssl enabled: false Ssl hostnames: Ssl expires at: Ssl issuer: Ssl starts at: Ssl subject: Ssl verified: =====> website checks information Checks disabled list: none Checks skipped list: none Checks computed wait to retire: 60 Checks global wait to retire: 60 Checks wait to retire: =====> website docker options information Docker options build: Docker options deploy: --restart=on-failure:10 Docker options run: =====> website domains information Domains app enabled: true Domains app vhosts: website.run.my.domain Domains global enabled: true Domains global vhosts: run.my.domain =====> website git information Git deploy branch: main Git global deploy branch: master Git keep git dir: false Git rev env var: GIT_REV Git sha: HEAD Git source image: Git last updated at: 1724758450 =====> website haproxy information Haproxy image: byjg/easy-haproxy:4.4.0 Haproxy letsencrypt email: Haproxy letsencrypt server: https://acme-v02.api.letsencrypt.org/directory Haproxy log level: ERROR =====> website logs information Logs computed max size: 10m Logs global max size: 10m Logs global vector sink: Logs max size: Logs vector global image: timberio/vector:0.39.0-debian Logs vector sink: =====> website network information Network attach post create: Network attach post deploy: Network bind all interfaces: false Network computed attach post create: all Network computed attach post deploy: Network computed bind all interfaces: false Network computed initial network: Network computed tld: Network global attach post create: all Network global attach post deploy: Network global bind all interfaces: false Network global initial network: Network global tld: Network initial network: Network static web listener: Network tld: Network web listeners: 172.17.0.4:8080 =====> website nginx information Nginx access log format: Nginx computed access log format: Nginx global access log format: Nginx access log path: Nginx computed access log path: /var/log/nginx/website-access.log Nginx global access log path: /var/log/nginx/website-access.log Nginx bind address ipv4: Nginx computed bind address ipv4: Nginx global bind address ipv4: Nginx bind address ipv6: Nginx computed bind address ipv6: :: Nginx global bind address ipv6: :: Nginx client max body size: Nginx computed client max body size: 1m Nginx global client max body size: 1m Nginx disable custom config: Nginx computed disable custom config: false Nginx global disable custom config: false Nginx error log path: Nginx computed error log path: /var/log/nginx/website-error.log Nginx global error log path: /var/log/nginx/website-error.log Nginx hsts include subdomains: Nginx computed hsts include subdomains: true Nginx global hsts include subdomains: true Nginx hsts max age: Nginx computed hsts max age: 15724800 Nginx global hsts max age: 15724800 Nginx hsts preload: Nginx computed hsts preload: false Nginx global hsts preload: false Nginx hsts: Nginx computed hsts: true Nginx global hsts: true Nginx last visited at: Nginx nginx conf sigil path: Nginx computed nginx conf sigil path: nginx.conf.sigil Nginx global nginx conf sigil path: nginx.conf.sigil Nginx proxy buffer size: Nginx computed proxy buffer size: 4k Nginx global proxy buffer size: 4k Nginx proxy buffering: Nginx computed proxy buffering: on Nginx global proxy buffering: on Nginx proxy buffers: Nginx computed proxy buffers: 8 4k Nginx global proxy buffers: 8 4k Nginx proxy busy buffers size: Nginx computed proxy busy buffers size: 8k Nginx global proxy busy buffers size: 8k Nginx proxy read timeout: Nginx computed proxy read timeout: 60s Nginx global proxy read timeout: 60s Nginx underscore in headers: Nginx computed underscore in headers: off Nginx global underscore in headers: off Nginx x forwarded for value: Nginx computed x forwarded for value: $remote_addr Nginx global x forwarded for value: $remote_addr Nginx x forwarded port value: Nginx computed x forwarded port value: $server_port Nginx global x forwarded port value: $server_port Nginx x forwarded proto value: Nginx computed x forwarded proto value: $scheme Nginx global x forwarded proto value: $scheme Nginx x forwarded ssl: Nginx computed x forwarded ssl: Nginx global x forwarded ssl: =====> website openresty information Openresty access log format: Openresty access log path: /var/log/nginx/website-access.log Openresty allowed letsencrypt domains func base64: cmV0dXJuIHRydWUK Openresty bind address ipv4: Openresty bind address ipv6: :: Openresty client max body size: Openresty error log path: /var/log/nginx/website-error.log Openresty global hsts: true Openresty computed hsts: true Openresty hsts: Openresty hsts include subdomains: true Openresty hsts max age: 15724800 Openresty hsts preload: false Openresty image: dokku/openresty-docker-proxy:0.8.0 Openresty letsencrypt email: Openresty letsencrypt server: https://acme-v02.api.letsencrypt.org/directory Openresty proxy buffer size: 4k Openresty proxy buffering: on Openresty proxy buffers: 8 4k Openresty proxy busy buffers size: 8k Openresty proxy read timeout: 60s Openresty underscore in headers: off Openresty x forwarded for value: $remote_addr Openresty x forwarded port value: $server_port Openresty x forwarded proto value: $scheme Openresty x forwarded ssl: =====> website ports information Ports map: Ports map detected: http:8080:8080 =====> website proxy information Proxy computed type: nginx Proxy enabled: true Proxy global type: nginx Proxy type: =====> website ps information Deployed: true Processes: 1 Ps can scale: true Ps computed procfile path: Procfile Ps global procfile path: Procfile Ps procfile path: Ps restart policy: on-failure:10 Restore: true Running: true Status web 1: running (CID: b4cc6dceeef) =====> website registry information Registry computed image repo: dokku/website Registry computed push on release: false Registry computed server: Registry global image repo template: Registry global push on release: Registry global server: Registry image repo: Registry push extra tags: Registry push on release: Registry server: Registry tag version: =====> website resource information =====> website scheduler information Scheduler computed selected: docker-local Scheduler global selected: docker-local Scheduler selected: =====> website scheduler-docker-local information Scheduler docker local init process: true Scheduler docker local parallel schedule count: =====> website scheduler-k3s information Scheduler k3s computed deploy timeout: 300s Scheduler k3s computed image pull secrets: Scheduler k3s computed letsencrypt server: prod Scheduler k3s computed namespace: default Scheduler k3s computed rollback on failure: false Scheduler k3s deploy timeout: Scheduler k3s global deploy timeout: 300s Scheduler k3s global image pull secrets: Scheduler k3s global ingress class: nginx Scheduler k3s global kube context: Scheduler k3s global kubeconfig path: /etc/rancher/k3s/k3s.yaml Scheduler k3s global letsencrypt email prod: Scheduler k3s global letsencrypt email stag: Scheduler k3s global letsencrypt server: prod Scheduler k3s global namespace: default Scheduler k3s global network interface: eth0 Scheduler k3s global rollback on failure: false Scheduler k3s image pull secrets: Scheduler k3s letsencrypt server: Scheduler k3s namespace: Scheduler k3s rollback on failure: =====> website storage information Storage build mounts: Storage deploy mounts: Storage run mounts: =====> website traefik information Traefik api enabled: false Traefik api vhost: traefik.dokku.me Traefik basic auth password: Traefik basic auth username: Traefik dashboard enabled: false Traefik image: traefik:2.11.2 Traefik letsencrypt email: Traefik letsencrypt server: https://acme-v02.api.letsencrypt.org/directory Traefik log level: ERROR Traefik http entry point: http Traefik https entry point: https
Additional information
dokku ps:inspect website
[
{
"AppArmorProfile": "docker-default",
"Args": [
"run",
"--config",
"/etc/caddy/Caddyfile",
"--adapter",
"caddyfile"
],
"Config": {
"AttachStderr": true,
"AttachStdin": false,
"AttachStdout": true,
"Cmd": [
"caddy",
"run",
"--config",
"/etc/caddy/Caddyfile",
"--adapter",
"caddyfile"
],
"Domainname": "",
"Entrypoint": null,
"Env": [
"DOKKU_APP_RESTORE=1",
"DOKKU_APP_TYPE=dockerfile",
"DOKKU_PROXY_PORT=80",
"GIT_REV=XXXXXX",
"DYNO=web.1",
"PORT=8080",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"CADDY_VERSION=XXXXXX",
"XDG_CONFIG_HOME=XXXXXX",
"XDG_DATA_HOME=XXXXXX"
],
"ExposedPorts": {
"2019/tcp": {},
"443/tcp": {},
"443/udp": {},
"80/tcp": {},
"8080/tcp": {}
},
"Hostname": "b4cc6dceeef5",
"Image": "dokku/website:latest",
"Labels": {
"com.dokku.app-name": "website",
"com.dokku.builder-type": "dockerfile",
"com.dokku.container-type": "deploy",
"com.dokku.dyno": "web.1",
"com.dokku.image-stage": "release",
"com.dokku.process-type": "web",
"dokku": "",
"openresty.access-log-path": "/var/log/nginx/website-access.log",
"openresty.bind-address-ipv6": "::",
"openresty.domains": "website.run.my.domain",
"openresty.error-log-path": "/var/log/nginx/website-error.log",
"openresty.hsts": "true",
"openresty.hsts-include-subdomains": "true",
"openresty.hsts-max-age": "15724800",
"openresty.hsts-preload": "false",
"openresty.https-port": "443",
"openresty.letsencrypt": "false",
"openresty.port-mapping": "http:8080:8080",
"openresty.proxy-buffer-size": "4k",
"openresty.proxy-buffering": "on",
"openresty.proxy-buffers": "8 4k",
"openresty.proxy-busy-buffer-size": "8k",
"openresty.proxy-connect-timeout": "60s",
"openresty.proxy-read-timeout": "60s",
"openresty.proxy-send-timeout": "60s",
"openresty.send-timeout": "60s",
"openresty.underscore-in-headers": "off",
"openresty.x-forwarded-for-value": "$remote_addr",
"openresty.x-forwarded-port-value": "$server_port",
"openresty.x-forwarded-proto-value": "$scheme",
"org.label-schema.schema-version": "1.0",
"org.label-schema.vendor": "dokku",
"org.opencontainers.image.description": "a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go",
"org.opencontainers.image.documentation": "https://caddyserver.com/docs",
"org.opencontainers.image.licenses": "Apache-2.0",
"org.opencontainers.image.source": "https://github.com/caddyserver/caddy-docker",
"org.opencontainers.image.title": "Caddy",
"org.opencontainers.image.url": "https://caddyserver.com",
"org.opencontainers.image.vendor": "Light Code Labs",
"org.opencontainers.image.version": "v2.8.4"
},
"OnBuild": null,
"OpenStdin": false,
"StdinOnce": false,
"Tty": false,
"User": "",
"Volumes": null,
"WorkingDir": "/srv"
},
"Created": "2024-08-27T11:33:34.651410094Z",
"Driver": "overlay2",
"ExecIDs": null,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/6f2dbff5fdf469f9316e944583e03613ef5b03bb74ec7285cb620dc1e4af0432-init/diff:/var/lib/docker/overlay2/06itjmpgyrgzxdof0uyltj3hs/diff:/var/lib/docker/overlay2/1jalps4xgf63oilgmb03bnunx/diff:/var/lib/docker/overlay2/b3670f90f94dba00e58b4671e2c84deaea7e929b4546f34d654efa3f8100de8a/diff:/var/lib/docker/overlay2/bec756f36af7349c8238d982c9a812abe6642b6ead4489f472dce0c9684ce674/diff:/var/lib/docker/overlay2/e3198216dcadfec812cf526b26ee9cf432839429b5d0d0415b666ed7e63d1db1/diff:/var/lib/docker/overlay2/198ba40949903fac2be38b73084b45cc5ee4a21b50095beb39d2e6c1ba33f465/diff:/var/lib/docker/overlay2/3090a3356915de9800ea39aa6f91ee52e2a448605c4b7bf86216b63d68956456/diff",
"MergedDir": "/var/lib/docker/overlay2/6f2dbff5fdf469f9316e944583e03613ef5b03bb74ec7285cb620dc1e4af0432/merged",
"UpperDir": "/var/lib/docker/overlay2/6f2dbff5fdf469f9316e944583e03613ef5b03bb74ec7285cb620dc1e4af0432/diff",
"WorkDir": "/var/lib/docker/overlay2/6f2dbff5fdf469f9316e944583e03613ef5b03bb74ec7285cb620dc1e4af0432/work"
},
"Name": "overlay2"
},
"HostConfig": {
"AutoRemove": false,
"Binds": null,
"BlkioDeviceReadBps": [],
"BlkioDeviceReadIOps": [],
"BlkioDeviceWriteBps": [],
"BlkioDeviceWriteIOps": [],
"BlkioWeight": 0,
"BlkioWeightDevice": [],
"CapAdd": null,
"CapDrop": null,
"Cgroup": "",
"CgroupParent": "",
"CgroupnsMode": "host",
"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": [],
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IOMaximumBandwidth": 0,
"IOMaximumIOps": 0,
"Init": true,
"IpcMode": "private",
"Isolation": "",
"KernelMemory": 0,
"KernelMemoryTCP": 0,
"Links": null,
"LogConfig": {
"Config": {
"max-size": "10m"
},
"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": "default",
"OomKillDisable": false,
"OomScoreAdj": 0,
"PidMode": "",
"PidsLimit": null,
"PortBindings": {},
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyPaths": [
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
],
"ReadonlyRootfs": false,
"RestartPolicy": {
"MaximumRetryCount": 10,
"Name": "on-failure"
},
"Runtime": "runc",
"SecurityOpt": null,
"ShmSize": 67108864,
"UTSMode": "",
"Ulimits": [],
"UsernsMode": "",
"VolumeDriver": "",
"VolumesFrom": null
},
"HostnamePath": "/var/lib/docker/containers/b4cc6dceeef50a372a3d5f97c8eeffc9cee8fa02d463ce3d3e54cb00240940c1/hostname",
"HostsPath": "/var/lib/docker/containers/b4cc6dceeef50a372a3d5f97c8eeffc9cee8fa02d463ce3d3e54cb00240940c1/hosts",
"Id": "b4cc6dceeef50a372a3d5f97c8eeffc9cee8fa02d463ce3d3e54cb00240940c1",
"Image": "sha256:9d4dca2d49091805c7dc2cf2dd8c416d49cca552a75f26575e12c7b61f6cd6fd",
"LogPath": "/var/lib/docker/containers/b4cc6dceeef50a372a3d5f97c8eeffc9cee8fa02d463ce3d3e54cb00240940c1/b4cc6dceeef50a372a3d5f97c8eeffc9cee8fa02d463ce3d3e54cb00240940c1-json.log",
"MountLabel": "",
"Mounts": [],
"Name": "/website.web.1",
"NetworkSettings": {
"Bridge": "",
"EndpointID": "0685f30f6b8ff4b47be15bb5505dee4531222f893f3848edb534f819532ce8d5",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"HairpinMode": false,
"IPAddress": "172.17.0.4",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:04",
"Networks": {
"all": {
"Aliases": [
"website.web",
"b4cc6dceeef5.website.web",
"b4cc6dceeef5"
],
"DriverOpts": {},
"EndpointID": "fb019d12744ccc51bff2be8f6d40c9fb6f454c053e41c240e096187ac498ac76",
"Gateway": "172.22.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAMConfig": {},
"IPAddress": "172.22.0.38",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"Links": null,
"MacAddress": "02:42:ac:16:00:26",
"NetworkID": "d68921443e8e74937fe5e1ddbd1d5313c7ec376d0e5db323f76ac4c887e98a55"
},
"bridge": {
"Aliases": null,
"DriverOpts": null,
"EndpointID": "0685f30f6b8ff4b47be15bb5505dee4531222f893f3848edb534f819532ce8d5",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAMConfig": null,
"IPAddress": "172.17.0.4",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"Links": null,
"MacAddress": "02:42:ac:11:00:04",
"NetworkID": "2c7b39806da6d4db326bf32cd47a0789dcfa60aeddbff75c0715232819862c82"
}
},
"Ports": {
"2019/tcp": null,
"443/tcp": null,
"443/udp": null,
"80/tcp": null,
"8080/tcp": null
},
"SandboxID": "9c5bbacddd8da4f98977c1a70f1f1b2c3cfe73a775861d1a01e50249104bbf2a",
"SandboxKey": "/var/run/docker/netns/9c5bbacddd8d",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null
},
"Path": "caddy",
"Platform": "linux",
"ProcessLabel": "",
"ResolvConfPath": "/var/lib/docker/containers/b4cc6dceeef50a372a3d5f97c8eeffc9cee8fa02d463ce3d3e54cb00240940c1/resolv.conf",
"RestartCount": 0,
"State": {
"Dead": false,
"Error": "",
"ExitCode": 0,
"FinishedAt": "0001-01-01T00:00:00Z",
"OOMKilled": false,
"Paused": false,
"Pid": 1267281,
"Restarting": false,
"Running": true,
"StartedAt": "2024-08-27T11:33:35.601052347Z",
"Status": "running"
}
}
]
dokku nginx:show-config
server {
listen [::]:8080;
listen 8080;
server_name website.run.my.domain;
access_log /var/log/nginx/website-access.log;
error_log /var/log/nginx/website-error.log;
underscores_in_headers off;
location / {
gzip on;
gzip_min_length 1100;
gzip_buffers 4 32k;
gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/x-javascript application/wasm application/json application/xml application/rss+xml font/truetype application/x-font-ttf font/opentype application/vnd.ms-fontobject image/svg+xml;
gzip_vary on;
gzip_comp_level 6;
proxy_pass http://website-8080;
proxy_http_version 1.1;
proxy_read_timeout 60s;
proxy_buffer_size 4k;
proxy_buffering on;
proxy_buffers 8 4k;
proxy_busy_buffers_size 8k;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Request-Start $msec;
}
client_max_body_size 1m;
error_page 400 401 402 403 405 406 407 408 409 410 411 412 413 414 415 416 417 418 420 422 423 424 426 428 429 431 444 449 450 451 /400-error.html;
location /400-error.html {
root /var/lib/dokku/data/nginx-vhosts/dokku-errors;
internal;
}
error_page 404 /404-error.html;
location /404-error.html {
root /var/lib/dokku/data/nginx-vhosts/dokku-errors;
internal;
}
error_page 500 501 502 503 504 505 506 507 508 509 510 511 /500-error.html;
location /500-error.html {
root /var/lib/dokku/data/nginx-vhosts/dokku-errors;
internal;
}
include /home/dokku/website/nginx.conf.d/*.conf;
}
upstream website-8080 {
server 172.17.0.4:8080;
}
Output of failing commands after running: dokku trace:off
`dokku nginx:start`
fail: nginx: runsv not running
### Output of failing commands after running: dokku trace:on
```shell
`dokku nginx:start`
+ export DOKKU_HOST_ROOT=/srv/dokku/home/dokku
+ DOKKU_HOST_ROOT=/srv/dokku/home/dokku
+ export DOKKU_DISTRO
++ . /etc/os-release
++ echo ubuntu
+ DOKKU_DISTRO=ubuntu
+ export DOCKER_BIN=/usr/local/bin/docker
+ DOCKER_BIN=/usr/local/bin/docker
+ export DOKKU_IMAGE=gliderlabs/herokuish:latest-22
+ DOKKU_IMAGE=gliderlabs/herokuish:latest-22
+ export DOKKU_CNB_BUILDER=heroku/builder:22
+ DOKKU_CNB_BUILDER=heroku/builder:22
+ export DOKKU_LIB_ROOT=/var/lib/dokku
+ DOKKU_LIB_ROOT=/var/lib/dokku
+ export PLUGIN_PATH=/var/lib/dokku/plugins
+ PLUGIN_PATH=/var/lib/dokku/plugins
+ export PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ export PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ export PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ export PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ export PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ export DOKKU_SYSTEM_GROUP=dokku
+ DOKKU_SYSTEM_GROUP=dokku
+ export DOKKU_SYSTEM_USER=dokku
+ DOKKU_SYSTEM_USER=dokku
+ export DOKKU_API_VERSION=1
+ DOKKU_API_VERSION=1
+ export DOKKU_NOT_IMPLEMENTED_EXIT=10
+ DOKKU_NOT_IMPLEMENTED_EXIT=10
+ export DOKKU_VALID_EXIT=0
+ DOKKU_VALID_EXIT=0
+ export DOKKU_PID=8168
+ DOKKU_PID=8168
+ export DOKKU_LOGS_DIR=/var/log/dokku
+ DOKKU_LOGS_DIR=/var/log/dokku
+ export DOKKU_LOGS_HOST_DIR=/var/log/dokku
+ DOKKU_LOGS_HOST_DIR=/var/log/dokku
+ export DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ export DOKKU_CONTAINER_LABEL=dokku
+ DOKKU_CONTAINER_LABEL=dokku
+ export 'DOKKU_GLOBAL_BUILD_ARGS=--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku'
+ DOKKU_GLOBAL_BUILD_ARGS='--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku'
+ export 'DOKKU_GLOBAL_RUN_ARGS=--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku'
+ DOKKU_GLOBAL_RUN_ARGS='--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku'
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ parse_args nginx:start
+ declare 'desc=top-level cli arg parser'
+ local next_index=1
+ local skip=false
+ args=("$@")
+ local args
+ local flags
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ [[ false == \t\r\u\e ]]
+ [[ nginx:start == \-\-\a\p\p ]]
+ [[ nginx:start =~ ^--.* ]]
+ next_index=2
+ [[ -z '' ]]
++ echo -e ''
++ sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//'
+ export DOKKU_GLOBAL_FLAGS=
+ DOKKU_GLOBAL_FLAGS=
+ return 0
+ args=("$@")
+ skip_arg=false
+ [[ nginx:start =~ ^--.* ]]
+ has_tty
+ declare 'desc=return 0 if we have a tty'
+ [[ '' == \t\r\u\e ]]
+ [[ '' == \t\r\u\e ]]
++ LC_ALL=C
++ /usr/bin/tty
+ [[ /dev/pts/0 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
+ [[ nginx:start =~ ^plugin:.* ]]
+ [[ nginx:start == \s\s\h\-\k\e\y\s\:\a\d\d ]]
+ [[ nginx:start == \s\s\h\-\k\e\y\s\:\r\e\m\o\v\e ]]
+ [[ nginx:start == \s\c\h\e\d\u\l\e\r\-\k\3\s\:\i\n\i\t\i\a\l\i\z\e ]]
+ [[ nginx:start == \s\c\h\e\d\u\l\e\r\-\k\3\s\:\u\n\i\n\s\t\a\l\l ]]
+ [[ -n nginx:start ]]
+ export -n SSH_ORIGINAL_COMMAND
+ exit_code=0
+ [[ nginx:start =~ git-* ]]
+ [[ nginx:start =~ git:* ]]
+ readarray -t -O 0 ssh_arg_array
++ printf %s nginx:start
++ xargs -n 1
+ set -f
+ /usr/bin/dokku nginx:start
+ export DOKKU_HOST_ROOT=/srv/dokku/home/dokku
+ DOKKU_HOST_ROOT=/srv/dokku/home/dokku
+ export DOKKU_DISTRO
++ . /etc/os-release
++ echo ubuntu
+ DOKKU_DISTRO=ubuntu
+ export DOCKER_BIN=/usr/local/bin/docker
+ DOCKER_BIN=/usr/local/bin/docker
+ export DOKKU_IMAGE=gliderlabs/herokuish:latest-22
+ DOKKU_IMAGE=gliderlabs/herokuish:latest-22
+ export DOKKU_CNB_BUILDER=heroku/builder:22
+ DOKKU_CNB_BUILDER=heroku/builder:22
+ export DOKKU_LIB_ROOT=/var/lib/dokku
+ DOKKU_LIB_ROOT=/var/lib/dokku
+ export PLUGIN_PATH=/var/lib/dokku/plugins
+ PLUGIN_PATH=/var/lib/dokku/plugins
+ export PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available
+ export PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled
+ export PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins
+ export PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available
+ export PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled
+ export DOKKU_SYSTEM_GROUP=dokku
+ DOKKU_SYSTEM_GROUP=dokku
+ export DOKKU_SYSTEM_USER=dokku
+ DOKKU_SYSTEM_USER=dokku
+ export DOKKU_API_VERSION=1
+ DOKKU_API_VERSION=1
+ export DOKKU_NOT_IMPLEMENTED_EXIT=10
+ DOKKU_NOT_IMPLEMENTED_EXIT=10
+ export DOKKU_VALID_EXIT=0
+ DOKKU_VALID_EXIT=0
+ export DOKKU_PID=8168
+ DOKKU_PID=8168
+ export DOKKU_LOGS_DIR=/var/log/dokku
+ DOKKU_LOGS_DIR=/var/log/dokku
+ export DOKKU_LOGS_HOST_DIR=/var/log/dokku
+ DOKKU_LOGS_HOST_DIR=/var/log/dokku
+ export DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log
+ export DOKKU_CONTAINER_LABEL=dokku
+ DOKKU_CONTAINER_LABEL=dokku
+ export 'DOKKU_GLOBAL_BUILD_ARGS=--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku'
+ DOKKU_GLOBAL_BUILD_ARGS='--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku'
+ export 'DOKKU_GLOBAL_RUN_ARGS=--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku'
+ DOKKU_GLOBAL_RUN_ARGS='--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku'
+ source /var/lib/dokku/core-plugins/available/common/functions
++ set -eo pipefail
++ [[ -n 1 ]]
++ set -x
+ parse_args nginx:start
+ declare 'desc=top-level cli arg parser'
+ local next_index=1
+ local skip=false
+ args=("$@")
+ local args
+ local flags
+ for arg in "$@"
+ [[ false == \t\r\u\e ]]
+ case "$arg" in
+ [[ false == \t\r\u\e ]]
+ [[ nginx:start == \-\-\a\p\p ]]
+ [[ nginx:start =~ ^--.* ]]
+ next_index=2
+ [[ -z '' ]]
++ sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//'
++ echo -e ''
+ export DOKKU_GLOBAL_FLAGS=
+ DOKKU_GLOBAL_FLAGS=
+ return 0
+ args=("$@")
+ skip_arg=false
+ [[ nginx:start =~ ^--.* ]]
+ has_tty
+ declare 'desc=return 0 if we have a tty'
+ [[ '' == \t\r\u\e ]]
+ [[ '' == \t\r\u\e ]]
++ LC_ALL=C
++ /usr/bin/tty
+ [[ /dev/pts/0 == \n\o\t\ \a\ \t\t\y ]]
+ return 0
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
+ [[ nginx:start =~ ^plugin:.* ]]
+ [[ nginx:start == \s\s\h\-\k\e\y\s\:\a\d\d ]]
+ [[ nginx:start == \s\s\h\-\k\e\y\s\:\r\e\m\o\v\e ]]
+ [[ nginx:start == \s\c\h\e\d\u\l\e\r\-\k\3\s\:\i\n\i\t\i\a\l\i\z\e ]]
+ [[ nginx:start == \s\c\h\e\d\u\l\e\r\-\k\3\s\:\u\n\i\n\s\t\a\l\l ]]
+ [[ -n '' ]]
+ dokku_auth nginx:start
+ declare 'desc=calls user-auth plugin trigger'
+ export SSH_USER=dokku
+ SSH_USER=dokku
+ export SSH_NAME=personal
+ SSH_NAME=personal
+ export DOKKU_COMMAND=nginx:start
+ DOKKU_COMMAND=nginx:start
++ wc -l
++ find /var/lib/dokku/plugins/enabled/20_events/user-auth
+ local user_auth_count=1
+ [[ 1 == 0 ]]
+ [[ 1 == 1 ]]
+ [[ -f /var/lib/dokku/plugins/enabled/20_events/user-auth ]]
+ return 0
+ case "$1" in
+ execute_dokku_cmd nginx:start
+ declare 'desc=executes dokku sub-commands'
+ local PLUGIN_NAME=nginx:start
+ local PLUGIN_CMD=nginx:start
+ local implemented=0
+ local script
+ argv=("$@")
+ local argv
+ case "$PLUGIN_NAME" in
+ local PLUGIN_NAME=nginx-vhosts:start
++ readlink -f /var/lib/dokku/plugins/enabled/nginx-vhosts
+ [[ /var/lib/dokku/core-plugins/available/nginx-vhosts == *core-plugins* ]]
+ [[ nginx:start == \n\g\i\n\x\:\s\t\a\r\t ]]
+ shift 1
+ [[ -n '' ]]
+ set -- nginx:start
+ [[ -x /var/lib/dokku/plugins/enabled/nginx-vhosts:start/subcommands/default ]]
+ [[ -x /var/lib/dokku/plugins/enabled/nginx-vhosts:start/subcommands/nginx:start ]]
+ [[ -x /var/lib/dokku/plugins/enabled/nginx-vhosts/subcommands/start ]]
+ [[ -n start ]]
+ /var/lib/dokku/plugins/enabled/nginx-vhosts/subcommands/start nginx:start
++ source /var/lib/dokku/core-plugins/available/common/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
++ source /var/lib/dokku/core-plugins/available/common/property-functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
++ source /var/lib/dokku/plugins/available/nginx-vhosts/functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
+++ source /var/lib/dokku/plugins/available/certs/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
++++ source /var/lib/dokku/core-plugins/available/common/functions
+++++ set -eo pipefail
+++++ [[ -n 1 ]]
+++++ set -x
+++ source /var/lib/dokku/plugins/available/config/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
++++ source /var/lib/dokku/core-plugins/available/common/functions
+++++ set -eo pipefail
+++++ [[ -n 1 ]]
+++++ set -x
+++ source /var/lib/dokku/plugins/available/nginx-vhosts/internal-functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
++++ source /var/lib/dokku/core-plugins/available/common/functions
+++++ set -eo pipefail
+++++ [[ -n 1 ]]
+++++ set -x
++++ source /var/lib/dokku/core-plugins/available/common/property-functions
+++++ set -eo pipefail
+++++ [[ -n 1 ]]
+++++ set -x
++ source /var/lib/dokku/plugins/available/nginx-vhosts/internal-functions
+++ set -eo pipefail
+++ [[ -n 1 ]]
+++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
+++ source /var/lib/dokku/core-plugins/available/common/property-functions
++++ set -eo pipefail
++++ [[ -n 1 ]]
++++ set -x
+ set -eo pipefail
+ [[ -n 1 ]]
+ set -x
+ cmd-nginx-start nginx:start
+ declare 'desc=starts the nginx server'
+ declare cmd=nginx:start
+ [[ nginx:start == \n\g\i\n\x\:\s\t\a\r\t ]]
+ shift 1
+ fn-plugin-property-write nginx --global proxy-status started
+ declare 'desc=read a key from the property store for an app'
+ declare PLUGIN=nginx APP=--global KEY=proxy-status VALUE=started
+ /var/lib/dokku/core-plugins/available/common/prop set nginx --global proxy-status started
+ fn-nginx-vhosts-nginx-init-cmd enable
+ declare 'desc=start nginx for given distros'
+ declare CMD=enable
+ local NGINX_INIT_NAME
+ NGINX_INIT_NAME=nginx
+ fn-nginx-vhosts-uses-openresty
+ declare 'desc=returns whether openresty is in use or not'
+ [[ -x /usr/bin/openresty ]]
+ return 1
+ local systemctl_path=/bin/systemctl
+ [[ -x /usr/bin/systemctl ]]
+ case "$DOKKU_DISTRO" in
+ [[ -x /bin/systemctl ]]
+ [[ -x /usr/bin/sv ]]
+ sudo /usr/bin/sv enable nginx
+ fn-nginx-vhosts-nginx-init-cmd start
+ declare 'desc=start nginx for given distros'
+ declare CMD=start
+ local NGINX_INIT_NAME
+ NGINX_INIT_NAME=nginx
+ fn-nginx-vhosts-uses-openresty
+ declare 'desc=returns whether openresty is in use or not'
+ [[ -x /usr/bin/openresty ]]
+ return 1
+ local systemctl_path=/bin/systemctl
+ [[ -x /usr/bin/systemctl ]]
+ case "$DOKKU_DISTRO" in
+ [[ -x /bin/systemctl ]]
+ [[ -x /usr/bin/sv ]]
+ sudo /usr/bin/sv start nginx
ok: run: nginx: (pid 8093) 135s, want down, got TERM
+ implemented=1
+ [[ 1 -eq 0 ]]
+ [[ 1 -eq 0 ]]
+ exit_code=0
+ set +f
+ exit 0