Commit b4aa4fd
fix: nginx DNS resolver for Railway private networking
127.0.0.11 (Docker embedded DNS) is not available in Railway's container
environment. Instead, the correct nameserver is in /etc/resolv.conf at runtime.
Changes:
- web/start.sh: startup script that reads nameserver from /etc/resolv.conf
and substitutes __DNS_RESOLVER__ placeholder in nginx.conf before starting
nginx. Falls back to 8.8.8.8 if resolv.conf is empty (shouldn't happen).
- web/nginx.conf: replaces hard-coded '127.0.0.11' with '__DNS_RESOLVER__'
placeholder that start.sh replaces at container startup.
- web/Dockerfile: copies start.sh and uses it as the container CMD instead
of launching nginx directly.
This restores the /api/ and /auth/ proxy routes to api.railway.internal:3001
which allows the dashboard and Resend webhooks to work via openmail.win.
Co-authored-by: ShadowWalker2014 <ShadowWalker2014@users.noreply.github.com>1 parent f93e5db commit b4aa4fd
3 files changed
Lines changed: 25 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
58 | 61 | | |
59 | | - | |
| 62 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
0 commit comments