mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 17:35:52 +03:00
[GH-ISSUE #1575] Ability to inject rules on first startup? #1188
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#1188
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mckernanin on GitHub (Nov 9, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1575
Is your feature request related to a problem? Please describe.
I'm working on adding a simple docker-compose setup to an open source project, have previously used Traefik but NPM is very user friendly and for our use case, a better fit for our users. I'm trying to preconfigure everything that I can. I would like a way to inject some starter proxy routes into NPM.
Describe the solution you'd like
Very open to the actual solution. Could be an INIT SQL file for the DB, could be ability to import/export routes from the UI.
Describe alternatives you've considered
I'll investigate running an init container to setup the database on initial setup
Additional context
@mckernanin commented on GitHub (Nov 9, 2021):
I looked up the base container for maria, and it does support init sql from a directory:
github.com/yobasystems/alpine-mariadb@5fa6982431/alpine-mariadb-amd64/files/run.sh (L74)@chaptergy commented on GitHub (Nov 9, 2021):
Unfortunately there is currently no built-in way to do this. Populating the database is not enough, since the db is used to display the data in the admin ui, but changes in the db will not automatically be propagated to nginx. So when the api receives a request, the nginx config is generated and the db is updated, but the nginx and the db are not connected.
Here is how I would suggest doing this: Use the SQLite file instead of an external database and provide a pre-set-up SQLite file and some nginx config files to set up what you need, which can then be copied into the container using
docker cp.@mckernanin commented on GitHub (Nov 9, 2021):
Ok thanks. Going to close this, I ended up deciding to just provide a walkthrough on how to setup NPM. If I really wanted it to be config driven, I'd go back to traefik