Прокси-сервер Nginx в докере завершился с кодом 0. Как я могу это исправить?
Я создал контейнер nginx и letenscrypt с помощью руководства: Использование Docker для настройки обратного прокси-сервера Nginx с автоматической генерацией SSL . Мой docker-compose.yml выглядит так:
version: "3.7"
services:
reverse-proxy:
image: "jwilder/nginx-proxy:latest"
container_name: "reverse-proxy"
volumes:
- "html:/usr/share/nginx/html"
- "dhparam:/etc/nginx/dhparam"
- "vhost:/etc/nginx/vhost.d"
- "certs:/etc/nginx/certs"
- "/run/docker.sock:/tmp/docker.sock:ro"
restart: "always"
networks:
- "net"
ports:
- "83:83"
- "444:444"
letsencrypt:
image: "jrcs/letsencrypt-nginx-proxy-companion:latest"
container_name: "letsencrypt-helper"
volumes:
- "html:/usr/share/nginx/html"
- "dhparam:/etc/nginx/dhparam"
- "vhost:/etc/nginx/vhost.d"
- "certs:/etc/nginx/certs"
- "/run/docker.sock:/var/run/docker.sock:ro"
environment:
NGINX_PROXY_CONTAINER: "reverse-proxy"
DEFAULT_EMAIL: "my.mail@gmail.com"
restart: "always"
depends_on:
- "reverse-proxy"
networks:
- "net"
volumes:
certs:
html:
vhost:
dhparam:
networks:
net:
external: true
Вместо [email protected] я написал почту Gmail. Когда я написал это в терминале:
docker run --rm --name nginx-dummy -e VIRTUAL_HOST=my-domain.duckdns.org -e LETSENCRYPT_HOST=my-domain.duckdns.org -e VIRTUAL_PORT=83 --network net -d nginx:latest
Я получил логи nginx-dummy:
nginx.1 | 2023/01/06 16:29:27 [notice] 19#19: signal 17 (SIGCHLD) received from 33
dockergen.1 | 2023/01/06 16:29:36 Received event start for container 68ca2a394500
dockergen.1 | 2023/01/06 16:29:36 Generated '/etc/nginx/conf.d/default.conf' from 11 containers
dockergen.1 | 2023/01/06 16:29:36 Running 'nginx -s reload'
nginx.1 | 2023/01/06 16:29:36 [notice] 19#19: signal 1 (SIGHUP) received from 57, reconfiguring
nginx.1 | 2023/01/06 16:29:36 [notice] 19#19: reconfiguring
nginx.1 | 2023/01/06 16:29:36 [notice] 19#19: using the "epoll" event method
nginx.1 | 2023/01/06 16:29:36 [notice] 19#19: start worker processes
nginx.1 | 2023/01/06 16:29:36 [notice] 19#19: start worker process 58
nginx.1 | 2023/01/06 16:29:36 [notice] 19#19: start worker process 59
nginx.1 | 2023/01/06 16:29:36 [notice] 19#19: start worker process 60
nginx.1 | 2023/01/06 16:29:36 [notice] 19#19: start worker process 61
nginx.1 | 2023/01/06 16:29:37 [notice] 52#52: gracefully shutting down
nginx.1 | 2023/01/06 16:29:37 [notice] 53#53: gracefully shutting down
nginx.1 | 2023/01/06 16:29:37 [notice] 55#55: gracefully shutting down
nginx.1 | 2023/01/06 16:29:37 [notice] 54#54: gracefully shutting down
nginx.1 | 2023/01/06 16:29:37 [notice] 55#55: exiting
nginx.1 | 2023/01/06 16:29:37 [notice] 52#52: exiting
nginx.1 | 2023/01/06 16:29:37 [notice] 53#53: exiting
nginx.1 | 2023/01/06 16:29:37 [notice] 54#54: exiting
nginx.1 | 2023/01/06 16:29:37 [notice] 52#52: exit
nginx.1 | 2023/01/06 16:29:37 [notice] 55#55: exit
nginx.1 | 2023/01/06 16:29:37 [notice] 53#53: exit
nginx.1 | 2023/01/06 16:29:37 [notice] 54#54: exit
nginx.1 | 2023/01/06 16:29:37 [notice] 19#19: signal 17 (SIGCHLD) received from 54
nginx.1 | 2023/01/06 16:29:37 [notice] 19#19: worker process 53 exited with code 0
nginx.1 | 2023/01/06 16:29:37 [notice] 19#19: worker process 54 exited with code 0
nginx.1 | 2023/01/06 16:29:37 [notice] 19#19: signal 29 (SIGIO) received
nginx.1 | 2023/01/06 16:29:37 [notice] 19#19: signal 17 (SIGCHLD) received from 52
nginx.1 | 2023/01/06 16:29:37 [notice] 19#19: worker process 52 exited with code 0
nginx.1 | 2023/01/06 16:29:37 [notice] 19#19: signal 29 (SIGIO) received
nginx.1 | 2023/01/06 16:29:37 [notice] 19#19: signal 17 (SIGCHLD) received from 55
nginx.1 | 2023/01/06 16:29:37 [notice] 19#19: worker process 55 exited with code 0
nginx.1 | 2023/01/06 16:29:37 [notice] 19#19: signal 29 (SIGIO) received
dockergen.1 | 2023/01/06 16:31:17 Received event die for container 68ca2a394500
dockergen.1 | 2023/01/06 16:31:18 Received event stop for container 68ca2a394500
dockergen.1 | 2023/01/06 16:31:18 Generated '/etc/nginx/conf.d/default.conf' from 10 containers
dockergen.1 | 2023/01/06 16:31:18 Running 'nginx -s reload'
nginx.1 | 2023/01/06 16:31:18 [notice] 19#19: signal 1 (SIGHUP) received from 63, reconfiguring
nginx.1 | 2023/01/06 16:31:18 [notice] 19#19: reconfiguring
nginx.1 | 2023/01/06 16:31:18 [notice] 19#19: using the "epoll" event method
nginx.1 | 2023/01/06 16:31:18 [notice] 19#19: start worker processes
nginx.1 | 2023/01/06 16:31:18 [notice] 19#19: start worker process 64
nginx.1 | 2023/01/06 16:31:18 [notice] 19#19: start worker process 65
nginx.1 | 2023/01/06 16:31:18 [notice] 19#19: start worker process 66
nginx.1 | 2023/01/06 16:31:18 [notice] 19#19: start worker process 67
dockergen.1 | 2023/01/06 16:31:18 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification 'nginx -s reload'
nginx.1 | 2023/01/06 16:31:18 [notice] 58#58: gracefully shutting down
nginx.1 | 2023/01/06 16:31:18 [notice] 59#59: gracefully shutting down
nginx.1 | 2023/01/06 16:31:18 [notice] 61#61: gracefully shutting down
nginx.1 | 2023/01/06 16:31:18 [notice] 60#60: gracefully shutting down
nginx.1 | 2023/01/06 16:31:18 [notice] 59#59: exiting
nginx.1 | 2023/01/06 16:31:18 [notice] 61#61: exiting
nginx.1 | 2023/01/06 16:31:18 [notice] 60#60: exiting
nginx.1 | 2023/01/06 16:31:18 [notice] 58#58: exiting
nginx.1 | 2023/01/06 16:31:18 [notice] 61#61: exit
nginx.1 | 2023/01/06 16:31:18 [notice] 58#58: exit
nginx.1 | 2023/01/06 16:31:18 [notice] 59#59: exit
nginx.1 | 2023/01/06 16:31:18 [notice] 60#60: exit
nginx.1 | 2023/01/06 16:31:18 [notice] 19#19: signal 17 (SIGCHLD) received from 61
nginx.1 | 2023/01/06 16:31:18 [notice] 19#19: worker process 58 exited with code 0
nginx.1 | 2023/01/06 16:31:18 [notice] 19#19: worker process 61 exited with code 0
nginx.1 | 2023/01/06 16:31:18 [notice] 19#19: signal 29 (SIGIO) received
nginx.1 | 2023/01/06 16:31:18 [notice] 19#19: signal 17 (SIGCHLD) received from 59
nginx.1 | 2023/01/06 16:31:18 [notice] 19#19: worker process 59 exited with code 0
nginx.1 | 2023/01/06 16:31:18 [notice] 19#19: worker process 60 exited with code 0
nginx.1 | 2023/01/06 16:31:18 [notice] 19#19: signal 29 (SIGIO) received
dockergen.1 | 2023/01/06 16:31:30 Received event start for container 2a93290cd6ea
dockergen.1 | 2023/01/06 16:31:30 Generated '/etc/nginx/conf.d/default.conf' from 11 containers
dockergen.1 | 2023/01/06 16:31:30 Running 'nginx -s reload'
nginx.1 | 2023/01/06 16:31:30 [notice] 19#19: signal 1 (SIGHUP) received from 70, reconfiguring
nginx.1 | 2023/01/06 16:31:30 [notice] 19#19: reconfiguring
nginx.1 | 2023/01/06 16:31:30 [notice] 19#19: using the "epoll" event method
nginx.1 | 2023/01/06 16:31:30 [notice] 19#19: start worker processes
nginx.1 | 2023/01/06 16:31:30 [notice] 19#19: start worker process 71
nginx.1 | 2023/01/06 16:31:30 [notice] 19#19: start worker process 72
nginx.1 | 2023/01/06 16:31:30 [notice] 19#19: start worker process 73
nginx.1 | 2023/01/06 16:31:30 [notice] 19#19: start worker process 74
nginx.1 | 2023/01/06 16:31:30 [notice] 64#64: gracefully shutting down
nginx.1 | 2023/01/06 16:31:30 [notice] 65#65: gracefully shutting down
nginx.1 | 2023/01/06 16:31:30 [notice] 67#67: gracefully shutting down
nginx.1 | 2023/01/06 16:31:30 [notice] 66#66: gracefully shutting down
nginx.1 | 2023/01/06 16:31:30 [notice] 67#67: exiting
nginx.1 | 2023/01/06 16:31:30 [notice] 65#65: exiting
nginx.1 | 2023/01/06 16:31:30 [notice] 64#64: exiting
nginx.1 | 2023/01/06 16:31:30 [notice] 66#66: exiting
nginx.1 | 2023/01/06 16:31:30 [notice] 66#66: exit
nginx.1 | 2023/01/06 16:31:30 [notice] 64#64: exit
nginx.1 | 2023/01/06 16:31:30 [notice] 65#65: exit
nginx.1 | 2023/01/06 16:31:30 [notice] 67#67: exit
nginx.1 | 2023/01/06 16:31:30 [notice] 19#19: signal 17 (SIGCHLD) received from 65
nginx.1 | 2023/01/06 16:31:30 [notice] 19#19: worker process 65 exited with code 0
nginx.1 | 2023/01/06 16:31:30 [notice] 19#19: worker process 67 exited with code 0
nginx.1 | 2023/01/06 16:31:30 [notice] 19#19: signal 29 (SIGIO) received
nginx.1 | 2023/01/06 16:31:30 [notice] 19#19: signal 17 (SIGCHLD) received from 67
nginx.1 | 2023/01/06 16:31:30 [notice] 19#19: worker process 64 exited with code 0
nginx.1 | 2023/01/06 16:31:30 [notice] 19#19: signal 29 (SIGIO) received
nginx.1 | 2023/01/06 16:31:30 [notice] 19#19: signal 17 (SIGCHLD) received from 66
nginx.1 | 2023/01/06 16:31:30 [notice] 19#19: worker process 66 exited with code 0
nginx.1 | 2023/01/06 16:31:30 [notice] 19#19: signal 29 (SIGIO) received
Я открываю порт 83 на своем маршрутизаторе, и я не получаю приветственную веб-страницу nginx. Что я делаю не так? Спасибо за помощь.
Я сделал это на компьютере с системой OMV.
Выключаю все остальные контейнеры, меняю имена поддоменов, порт и ничего не работает.