Repository navigation
Conversation
24737e9 to
de2ea7e
Compare
de2ea7e to
f367046
Compare
…host network where some other services may already use 80,443,81 ports
f367046 to
d95863d
Compare
| do | ||
| echo "- ${FILE}" | ||
| # Replace HTTP port | ||
| sed -i -E "s/listen 80([^0-9]|$)/listen ${HTTP_PORT}\1/g" "$FILE" |
There was a problem hiding this comment.
I see what you're trying to do here and I'm glad you thought of this. Something I would consider though..
This script runs on each startup, yet it seems like a run-once migration. Some options that might be better:
- create a migration, they're not just for databases. In this case it could iterate over all hosts and regenerate their nginx config, however there are risks doing this too
- Or keep this file but don't be specific with 80/443. Consider what should happen if I change to 8080/8443 and then change to 8888/9999. I'd expect this script to handle it
Option 2 is probably my preference here.
|
Thanks for the work on this! It's been on my mind to do this for a while... |
|
Any updates on this? |
… other custom ports set before
|
@jc21 I had some time this weekend to update the PR. Now it should work with any port that was previously set. |
|
Docker Image for build 6 is available on DockerHub: Note Ensure you backup your NPM instance before testing this image! Especially if there are database changes. Warning Changes and additions to DNS Providers require verification by at least 2 members of the community! |
|
Is there anything I need to change on this? |
Latest versions of TrueNAS have been migrated the Apps from k8s to docker and nginx-proxy-manager is the recommended way(in multiple discussion) to be used as a proxy for internal applications. For the setup to be secure and Nginx-proxy-manager to properly forward the traffic to the internal apps, it must be deployed using host_network options.
There are several issues on TrueNAS Apps Catalog repo([Enhancement]: Nginx Proxy Manager - host network and Allow Host Networking for Nginx Proxy Manager) asking for possibility to set nginx-proxy-manager with host_network, but since 80,443 and 81 ports may conflict with other running services on the server, TrueNAS admin require that nginx-proxy-manager should have the possibility to to use custom ports instead of default ones.
This PR change current behavior and adds option for default ports to be changed trough HTTP_PORT, HTTPS_PORT and WEB_UI_PORT environment variables.