docker-compose with-nginx-proxy example with self-signed ssl crashes with no debug logs
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- docker, docker-compose, nginx
- 领域
- devops, infrastructure
调研方向
从 .examples/.examples/docker-compose/with-nginx-proxy/mariadb/apache/compose.yaml 开始,使用所示的 MYSQL_PASSWORD 和 db.env 更改重现自签名证书设置。检查 reload 前后的 proxy 和生成的 nginx 配置,然后验证该示例是否能使用自签名证书成功运行,或说明如何启用更详细的 nginx 日志。
由索引模型根据 Issue 内容生成。
描述
When running the compose.yaml file from .examples/.examples/docker-compose/with-nginx-proxy/mariadb/apache with a self-signed certificate, nginx will crash with little to no explanation of what is happening. The example, running with a MYSQL_PASSWORD set and the db.env file appropriately updated, shows log entries like this, but does not explain why it is shutting down:
nginx.1 | 2025/02/08 14:22:09 [notice] 17#17: using the "epoll" event method
nginx.1 | 2025/02/08 14:22:09 [notice] 17#17: nginx/1.27.3
nginx.1 | 2025/02/08 14:22:09 [notice] 17#17: built by gcc 13.2.1 20240309 (Alpine 13.2.1_git20240309)
nginx.1 | 2025/02/08 14:22:09 [notice] 17#17: OS: Linux 6.1.118-Unraid
nginx.1 | 2025/02/08 14:22:09 [notice] 17#17: getrlimit(RLIMIT_NOFILE): 40960:40960
nginx.1 | 2025/02/08 14:22:09 [notice] 17#17: start worker processes
nginx.1 | 2025/02/08 14:22:09 [notice] 17#17: start worker process 24
nginx.1 | 2025/02/08 14:22:09 [notice] 17#17: start worker process 25
nginx.1 | 2025/02/08 14:22:09 [notice] 17#17: start worker process 26
<snip...>
dockergen.1 | 2025/02/08 14:22:09 Generated '/etc/nginx/conf.d/default.conf' from 4 containers
dockergen.1 | 2025/02/08 14:22:09 Running 'nginx -s reload'
nginx.1 | 2025/02/08 14:22:09 [notice] 17#17: signal 1 (SIGHUP) received from 57, reconfiguring
nginx.1 | 2025/02/08 14:22:09 [notice] 17#17: reconfiguring
dockergen.1 | 2025/02/08 14:22:10 Watching docker events
nginx.1 | 2025/02/08 14:22:09 [notice] 17#17: using the "epoll" event method
For reference, here is the dockerfile that I am using, the two changes are to set the VIRTUAL_HOST and the location of the db.env file with an appropriately updated db.env file:
services:
db:
image: mariadb:10.11
command: --transaction-isolation=READ-COMMITTED
restart: always
volumes:
- db:/var/lib/mysql:Z
environment:
- MYSQL_ROOT_PASSWORD=12345
- MARIADB_AUTO_UPGRADE=1
- MARIADB_DISABLE_UPGRADE_BACKUP=1
env_file:
- /path/to/your/db.env
redis:
image: redis:alpine
restart: always
app:
image: nextcloud:apache
restart: always
volumes:
- nextcloud:/var/www/html:z
# NOTE: The `volumes` config of the `cron` and `app` containers must match
environment:
- VIRTUAL_HOST=servhostname.local
- LETSENCRYPT_HOST=
- LETSENCRYPT_EMAIL=
- MYSQL_HOST=db
- REDIS_HOST=redis
env_file:
- /path/to/your/db.env
depends_on:
- db
- redis
# Added proxy container dependency below.
# It is unclear on when or why it happens, but sometimes NC manages to start before the proxy
# and it breaks for whatever weird reason resulting in the need of manual proxy container restart.
- proxy
networks:
- proxy-tier
- default
cron:
image: nextcloud:apache
restart: always
volumes:
- nextcloud:/var/www/html:z
# NOTE: The `volumes` config of the `cron` and `app` containers must match
entrypoint: /cron.sh
depends_on:
- db
- redis
# letsencrypt-companion:
# image: nginxproxy/acme-companion
# restart: always
# environment:
# - DEFAULT_EMAIL=
# volumes:
# - certs:/etc/nginx/certs:z
# - acme:/etc/acme.sh:z
# - vhost.d:/etc/nginx/vhost.d:z
# - html:/usr/share/nginx/html:z
# - /var/run/docker.sock:/var/run/docker.sock:z,ro
# networks:
# - proxy-tier
# depends_on:
# - proxy
# self signed
omgwtfssl:
image: paulczar/omgwtfssl
restart: "no"
volumes:
- certs:/certs
environment:
- SSL_SUBJECT=servhostname.local
- [email protected]
- SSL_KEY=/certs/servhostname.local.key
- SSL_CSR=/certs/servhostname.local.csr
- SSL_CERT=/certs/servhostname.local.crt
networks:
- proxy-tier
volumes:
db:
nextcloud:
certs:
acme:
vhost.d:
html:
dhparam:
networks:
proxy-tier:
I believe this example should be configured so that nginx-proxy produces more granular log messages, or at least put a comment in the compose.yaml that provides an environment variable that can be set to increase nginx verbosity. I'm not sure how to fix the example so that it actually runs with the self-signed certificate, though.
- 主要语言
- Shell
- 星标
- 7.4k
- 派生
- 1.9k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nextcloud/docker 的其他 Issue
-
1. To develop bug feature: cron image
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 70/100
-
bug docs
难度 1/5 1 小时以内 新手友好度 72/100
-
0. Needs triage bug
难度 4/5 3-5 天 新手友好度 35/100
-
Imagick architecture mismatch (x86_64 vs aarch64) on official arm64 image causes Apache segfaults未关闭0. Needs triage bug
难度 4/5 3-5 天 新手友好度 50/100
相似的 Issue
-
Install software-properties-common before adding the Suricata PPA可能已有人在做 @himanishpuri 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
Ergane-Foundation/vajra#55 · 2 条评论 ·
维护者通常 2 天内回复
-
[cifuzz] "Minimizing crashes reduces fuzzing time" is logged for every batch run, even with minimize-crashes off可能已有人在做 @martinfrancois 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 1 天内回复
-
enhancement
难度 1/5 1 小时以内 新手友好度 85/100
alunduil/alunduil-chezmoi#914 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 78/100
obra/superpowers#2505 ·
维护者通常 3 天内回复
-
cao-evolution cao-evolution:compiler-security
难度 1/5 1 小时以内 新手友好度 86/100
githubnext/gh-aw-cao#17586 ·
维护者通常 1 天内回复