I copied a standard docker-compose yaml file and tried to launch it. However, I keep getting crashes.
Docker-compose.yml
version: '3'
services:
nginx-proxy:
image: nginx
container_name: nginx-proxy
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
restart: always
networks:
- proxy
docker-gen:
image: jwilder/docker-gen
command: -notify-sighup nginx-proxy -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
container_name: nginx-proxy-gen
depends_on:
- nginx-proxy
volumes:
- conf:/etc/nginx/conf.d
- vhost:/etc/nginx/vhost.d
- certs:/etc/nginx/certs:ro
- ./nginx/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
restart: always
networks:
- proxy
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: nginx-proxy-le
depends_on:
- nginx-proxy
- docker-gen
volumes:
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- certs:/etc/nginx/certs
- acme:/etc/acme.sh
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- NGINX_PROXY_CONTAINER=nginx-proxy
- NGINX_DOCKER_GEN_CONTAINER=nginx-proxy-gen
restart: always
networks:
- proxy
volumes:
conf:
vhost:
html:
certs:
acme:
networks:
proxy:
The configuration of the containers is connected through the "proxy" network. Here is the log file depicting the crash of the nginx workers.
Docker logs
Attaching to nginx-proxy, nginx-proxy-gen, nginx-proxy-le
nginx-proxy | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx-proxy | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
nginx-proxy | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
nginx-proxy | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
nginx-proxy | 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version
nginx-proxy | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
nginx-proxy | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
nginx-proxy | /docker-entrypoint.sh: Configuration complete; ready for start up
nginx-proxy | 2023/04/09 07:10:20 [notice] 1#1: using the "epoll" event method
nginx-proxy | 2023/04/09 07:10:20 [notice] 1#1: nginx/1.23.4
nginx-proxy | 2023/04/09 07:10:20 [notice] 1#1: built by gcc 10.2.1 20210110 (Debian 10.2.1-6)
nginx-proxy | 2023/04/09 07:10:20 [notice] 1#1: OS: Linux 5.15.0-58-generic
nginx-proxy | 2023/04/09 07:10:20 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
nginx-proxy | 2023/04/09 07:10:20 [notice] 1#1: start worker processes
nginx-proxy | 2023/04/09 07:10:20 [notice] 1#1: start worker process 28
nginx-proxy | 2023/04/09 07:10:20 [notice] 1#1: start worker process 29
nginx-proxy | 2023/04/09 07:10:20 [notice] 1#1: start worker process 30
nginx-proxy | 2023/04/09 07:10:20 [notice] 1#1: start worker process 31
nginx-proxy-le | Info: running acme-companion version v2.2.7-5-gdefde43
nginx-proxy-gen | 2023/04/09 07:10:21 Generated '/etc/nginx/conf.d/default.conf' from 4 containers
nginx-proxy-gen | 2023/04/09 07:10:21 Sending container 'nginx-proxy' signal '1'
nginx-proxy | 2023/04/09 07:10:21 [notice] 1#1: signal 1 (SIGHUP) received, reconfiguring
nginx-proxy | 2023/04/09 07:10:21 [notice] 1#1: reconfiguring
nginx-proxy | 2023/04/09 07:10:21 [notice] 1#1: using the "epoll" event method
nginx-proxy | 2023/04/09 07:10:21 [notice] 1#1: start worker processes
nginx-proxy | 2023/04/09 07:10:21 [notice] 1#1: start worker process 32
nginx-proxy | 2023/04/09 07:10:21 [notice] 1#1: start worker process 33
nginx-proxy | 2023/04/09 07:10:21 [notice] 1#1: start worker process 34
nginx-proxy | 2023/04/09 07:10:21 [notice] 1#1: start worker process 35
nginx-proxy-gen | 2023/04/09 07:10:21 Watching docker events
nginx-proxy-gen | 2023/04/09 07:10:21 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification ''
nginx-proxy | 2023/04/09 07:10:21 [notice] 28#28: gracefully shutting down
nginx-proxy | 2023/04/09 07:10:21 [notice] 28#28: exiting
nginx-proxy | 2023/04/09 07:10:21 [notice] 28#28: exit
nginx-proxy | 2023/04/09 07:10:21 [notice] 31#31: gracefully shutting down
nginx-proxy | 2023/04/09 07:10:21 [notice] 31#31: exiting
nginx-proxy | 2023/04/09 07:10:21 [notice] 31#31: exit
nginx-proxy | 2023/04/09 07:10:21 [notice] 29#29: gracefully shutting down
nginx-proxy | 2023/04/09 07:10:21 [notice] 29#29: exiting
nginx-proxy | 2023/04/09 07:10:21 [notice] 29#29: exit
nginx-proxy | 2023/04/09 07:10:21 [notice] 30#30: gracefully shutting down
nginx-proxy | 2023/04/09 07:10:21 [notice] 30#30: exiting
nginx-proxy | 2023/04/09 07:10:21 [notice] 30#30: exit
nginx-proxy | 2023/04/09 07:10:21 [notice] 1#1: signal 17 (SIGCHLD) received from 28
nginx-proxy | 2023/04/09 07:10:21 [notice] 1#1: worker process 28 exited with code 0
nginx-proxy | 2023/04/09 07:10:21 [notice] 1#1: worker process 29 exited with code 0
nginx-proxy | 2023/04/09 07:10:21 [notice] 1#1: worker process 30 exited with code 0
nginx-proxy | 2023/04/09 07:10:21 [notice] 1#1: signal 29 (SIGIO) received
nginx-proxy | 2023/04/09 07:10:21 [notice] 1#1: signal 17 (SIGCHLD) received from 31
nginx-proxy | 2023/04/09 07:10:21 [notice] 1#1: worker process 31 exited with code 0
nginx-proxy | 2023/04/09 07:10:21 [notice] 1#1: signal 29 (SIGIO) received
nginx-proxy-le | Info: 4096 bits RFC7919 Diffie-Hellman group found, generation skipped.
nginx-proxy-le | Reloading nginx docker-gen (using separate container nginx-proxy-gen)...
nginx-proxy-gen | 2023/04/09 07:10:22 Received signal: hangup
nginx-proxy-gen | 2023/04/09 07:10:22 Received signal: hangup
nginx-proxy-le | Reloading nginx (using separate container nginx-proxy)...
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: signal 1 (SIGHUP) received, reconfiguring
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: reconfiguring
nginx-proxy-gen | 2023/04/09 07:10:22 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification ''
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: using the "epoll" event method
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: start worker processes
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: start worker process 36
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: start worker process 37
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: start worker process 38
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: start worker process 39
nginx-proxy-le | 2023/04/09 07:10:22 Generated '/app/letsencrypt_service_data' from 4 containers
nginx-proxy-le | 2023/04/09 07:10:22 Running '/app/signal_le_service'
nginx-proxy-le | 2023/04/09 07:10:22 Watching docker events
nginx-proxy-le | 2023/04/09 07:10:22 Contents of /app/letsencrypt_service_data did not change. Skipping notification '/app/signal_le_service'
nginx-proxy | 2023/04/09 07:10:22 [notice] 32#32: gracefully shutting down
nginx-proxy | 2023/04/09 07:10:22 [notice] 32#32: exiting
nginx-proxy | 2023/04/09 07:10:22 [notice] 32#32: exit
nginx-proxy | 2023/04/09 07:10:22 [notice] 34#34: gracefully shutting down
nginx-proxy | 2023/04/09 07:10:22 [notice] 34#34: exiting
nginx-proxy | 2023/04/09 07:10:22 [notice] 34#34: exit
nginx-proxy | 2023/04/09 07:10:22 [notice] 33#33: gracefully shutting down
nginx-proxy | 2023/04/09 07:10:22 [notice] 33#33: exiting
nginx-proxy | 2023/04/09 07:10:22 [notice] 33#33: exit
nginx-proxy | 2023/04/09 07:10:22 [notice] 35#35: gracefully shutting down
nginx-proxy | 2023/04/09 07:10:22 [notice] 35#35: exiting
nginx-proxy | 2023/04/09 07:10:22 [notice] 35#35: exit
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: signal 17 (SIGCHLD) received from 34
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: worker process 32 exited with code 0
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: worker process 34 exited with code 0
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: worker process 33 exited with code 0
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: worker process 35 exited with code 0
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: signal 29 (SIGIO) received
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: signal 17 (SIGCHLD) received from 33
nginx-proxy-le | Reloading nginx docker-gen (using separate container nginx-proxy-gen)...
nginx-proxy-gen | 2023/04/09 07:10:22 Received signal: hangup
nginx-proxy-gen | 2023/04/09 07:10:22 Received signal: hangup
nginx-proxy-le | Reloading nginx (using separate container nginx-proxy)...
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: signal 1 (SIGHUP) received, reconfiguring
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: reconfiguring
nginx-proxy-le | Creating/renewal auth.gravitonhosting.com certificates... (auth.gravitonhosting.com)
nginx-proxy-gen | 2023/04/09 07:10:22 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification ''
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: using the "epoll" event method
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: start worker processes
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: start worker process 40
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: start worker process 41
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: start worker process 42
nginx-proxy | 2023/04/09 07:10:22 [notice] 1#1: start worker process 43
nginx-proxy | 2023/04/09 07:10:23 [notice] 36#36: gracefully shutting down
nginx-proxy | 2023/04/09 07:10:23 [notice] 36#36: exiting
nginx-proxy | 2023/04/09 07:10:23 [notice] 36#36: exit
nginx-proxy | 2023/04/09 07:10:23 [notice] 38#38: gracefully shutting down
nginx-proxy | 2023/04/09 07:10:23 [notice] 38#38: exiting
nginx-proxy | 2023/04/09 07:10:23 [notice] 38#38: exit
nginx-proxy | 2023/04/09 07:10:23 [notice] 37#37: gracefully shutting down
nginx-proxy | 2023/04/09 07:10:23 [notice] 37#37: exiting
nginx-proxy | 2023/04/09 07:10:23 [notice] 37#37: exit
nginx-proxy | 2023/04/09 07:10:23 [notice] 39#39: gracefully shutting down
nginx-proxy | 2023/04/09 07:10:23 [notice] 39#39: exiting
nginx-proxy | 2023/04/09 07:10:23 [notice] 39#39: exit
nginx-proxy | 2023/04/09 07:10:23 [notice] 1#1: signal 17 (SIGCHLD) received from 36
nginx-proxy | 2023/04/09 07:10:23 [notice] 1#1: worker process 36 exited with code 0
nginx-proxy | 2023/04/09 07:10:23 [notice] 1#1: worker process 37 exited with code 0
nginx-proxy | 2023/04/09 07:10:23 [notice] 1#1: worker process 38 exited with code 0
nginx-proxy | 2023/04/09 07:10:23 [notice] 1#1: signal 29 (SIGIO) received
nginx-proxy | 2023/04/09 07:10:23 [notice] 1#1: signal 17 (SIGCHLD) received from 39
nginx-proxy | 2023/04/09 07:10:23 [notice] 1#1: worker process 39 exited with code 0
nginx-proxy | 2023/04/09 07:10:23 [notice] 1#1: signal 29 (SIGIO) received
nginx-proxy-le | [Sun Apr 9 07:10:23 UTC 2023] Domains not changed.
nginx-proxy-le | [Sun Apr 9 07:10:23 UTC 2023] Skip, Next renewal time is: Thu Jun 8 06:38:18 UTC 2023
nginx-proxy-le | [Sun Apr 9 07:10:23 UTC 2023] Add '--force' to force to renew.
nginx-proxy-le | Sleep for 3600s
How can I fix this issues I just followed the documentation from here but i don't understand the source of the issue.
I am expecting the nginx worker to stay alive and running.