Add template to enable an IPv6 listener

By default nginx in the container only listens for IPv4 connections. Some users
want to enable direct IPv6 connectivity to the container either via forwarding
or NAT. This provides an easy method to allow that.
This commit is contained in:
Michael Brown 2023-04-04 13:36:41 -04:00
parent 4f610e7b5c
commit 7a7c47eefa
No known key found for this signature in database
GPG Key ID: 6C07FB3007CF9360
3 changed files with 14 additions and 2 deletions

View File

@ -11,8 +11,10 @@ templates:
- "templates/postgres.template.yml"
- "templates/redis.template.yml"
- "templates/web.template.yml"
## Uncomment the next line to enable the IPv6 listener
#- "templates/web.ipv6.template.yml"
- "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
## Uncomment these two lines if you wish to add Lets Encrypt (https)
#- "templates/web.ssl.template.yml"
#- "templates/web.letsencrypt.ssl.template.yml"

View File

@ -3,8 +3,10 @@
templates:
- "templates/web.template.yml"
## Uncomment the next line to enable the IPv6 listener
#- "templates/web.ipv6.template.yml"
- "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
## Uncomment these two lines if you wish to add Lets Encrypt (https)
#- "templates/web.ssl.template.yml"
#- "templates/web.letsencrypt.ssl.template.yml"

View File

@ -0,0 +1,8 @@
run:
- exec: echo "Enabling IPv6 listener"
- replace:
filename: "/etc/nginx/conf.d/discourse.conf"
from: listen 80;
to: |
listen 80;
listen [::]:80;