feat: Added nginx reverse proxy cookbook - #1501
Open
ronakmaheshwari wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new documentation “cookbook” under docs/cookbooks/nginx-reverse-proxy/ to demonstrate running Foundry VTT behind an nginx reverse proxy with Let’s Encrypt certificates managed by certbot, as an opt-in alternative to modifying the project’s main compose.yml.
Changes:
- Introduces a dedicated docker-compose stack for
foundry+nginx+certbot. - Adds nginx configuration intended to support ACME HTTP-01 challenges and reverse-proxying to Foundry.
- Adds a step-by-step README for bootstrapping certificates and enabling HTTPS.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| docs/cookbooks/nginx-reverse-proxy/README.md | Cookbook walkthrough and operational notes for nginx + certbot setup |
| docs/cookbooks/nginx-reverse-proxy/nginx/conf.d/foundry.conf.bootstrap | Bootstrap nginx config for initial ACME challenge + proxying |
| docs/cookbooks/nginx-reverse-proxy/nginx/conf.d/foundry.conf | Additional nginx config template content (currently overlaps with bootstrap flow) |
| docs/cookbooks/nginx-reverse-proxy/compose.yml | Example compose stack adding nginx + certbot alongside Foundry |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| @@ -0,0 +1,19 @@ | |||
| server { | |||
| listen 80; | |||
| server_name <foundry.example.com>; | |||
Comment on lines
+9
to
+13
| - `compose.yml` — full stack: `foundry`, `nginx`, `certbot` | ||
| - `nginx/conf.d/foundry.conf.bootstrap` — HTTP-only config used to | ||
| obtain the first certificate | ||
| - `nginx/conf.d/foundry.conf.example` — final HTTPS config, used | ||
| after the certificate exists |
| mkdir -p nginx/conf.d nginx/certs nginx/www data | ||
| ``` | ||
|
|
||
| 3. Copy the bootstrap config and edit `server_name` which is named as foundry.example.com: |
Comment on lines
+30
to
+32
| 4. Edit `compose.yml`: set `FOUNDRY_USERNAME`, `FOUNDRY_PASSWORD`, | ||
| `FOUNDRY_HOSTNAME`, and `server_name` to your domain. | ||
|
|
Comment on lines
+40
to
+42
| docker compose run --rm certbot certonly --webroot \ | ||
| -w /var/www/certbot -d <your>.domain.com \ | ||
| --email <you>@example.com --agree-tos --no-eff-email |
| environment: | ||
| - FOUNDRY_PASSWORD=<your_password> | ||
| - FOUNDRY_USERNAME=<your_username> | ||
| - FOUNDRY_ADMIN_KEY=atropos |
Comment on lines
+82
to
+90
| certbot: | ||
| image: certbot/certbot | ||
| volumes: | ||
| - ./nginx/certs:/etc/letsencrypt | ||
| - ./nginx/www:/var/www/certbot | ||
| entrypoint: > | ||
| sh -c "trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;" | ||
| networks: | ||
| - internal |
Comment on lines
+65
to
+66
| - Certificates renew automatically every 12 hours via the `certbot` | ||
| service loop. No newline at end of file |
Comment on lines
+40
to
+42
| server { | ||
| listen 80; | ||
| server_name foundry.example.com; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds: Nginx reverse proxy cookbook (#1178)
Adds a cookbook under
docs/cookbooks/nginx-reverse-proxy/demonstratinghow to run Foundry behind an nginx reverse proxy with automatic
Let's Encrypt certificates via certbot, per the request in #1178.
This does not modify the base
compose.yml— it's an opt-in cookbook,per discussion in the issue (not everyone wants nginx / already runs
Traefik or Caddy).
What's included
compose.yml— foundry + nginx + certbot servicesTested
swap to HTTPS config → renewal service running.