docs: fix nginx config mount path in DEPLOYMENT_DOCKER.md SSL example#188
docs: fix nginx config mount path in DEPLOYMENT_DOCKER.md SSL example#188andrerfneves wants to merge 1 commit into
Conversation
The production docker-compose SSL/TLS example mounted ./nginx.conf as
/etc/nginx/nginx.conf (the main nginx config file). The repo's nginx.conf
starts with `server {` — it is a server block intended for the sites-enabled
directory, not a standalone nginx configuration.
A user who follows the example verbatim would see nginx fail to start with:
nginx: [emerg] "server" directive is not allowed here
Fix the mount target to /etc/nginx/conf.d/default.conf.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b21fd4c7cb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - "443:443" | ||
| volumes: | ||
| - ./nginx.conf:/etc/nginx/nginx.conf | ||
| - ./nginx.conf:/etc/nginx/conf.d/default.conf |
There was a problem hiding this comment.
Mount a proxy/TLS config instead
In this SSL/TLS Compose example, this line now loads the repo’s app-serving nginx.conf into the separate nginx:alpine reverse-proxy container. That config only listens on port 80 and serves /usr/share/nginx/html locally, with no proxy_pass to the lightning-decoder service and no listen 443 ssl, so following this production example still will not terminate TLS or route traffic to the app despite mapping 443 and declaring depends_on. The mounted file here needs to be an actual TLS reverse-proxy config rather than the Dockerfile’s static-site config.
Useful? React with 👍 / 👎.
Summary
Fixes the nginx config mount path in the DEPLOYMENT_DOCKER.md SSL/TLS production docker-compose example.
Why
The production example mounted
./nginx.confas/etc/nginx/nginx.conf(the main nginx config file). However, the repo'snginx.confstarts withserver {— it is a server block intended for the sites-enabled directory (/etc/nginx/conf.d/default.conf), not a standalone nginx configuration.A developer following the example verbatim would encounter:
This happens because the main nginx config file requires
events {}andhttp {}wrapper blocks around server blocks.Changes
DEPLOYMENT_DOCKER.md: Changed./nginx.conf:/etc/nginx/nginx.confto./nginx.conf:/etc/nginx/conf.d/default.confin the SSL/TLS docker-compose exampleTest Plan
COPY nginx.conf /etc/nginx/conf.d/default.conf)