You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,13 @@
7
7
**Plug and play your docker containers into Pi-Hole & Nginx Proxy Manager**
8
8
9
9
Automatically detect running Docker containers based on labels, add them
10
-
as local DNS records in **Pi-Hole** and create matching proxy hosts in
10
+
as local DNS/CNAME records in **Pi-Hole** and create matching proxy hosts in
11
11
**Nginx Proxy Manager**.
12
12
13
13
## Key Features
14
14
15
15
- Automatic Docker container detection.
16
-
- Local DNS record creation in Pi-hole.
16
+
- Local DNS/CNAME record creation in Pi-hole.
17
17
- Nginx Proxy Manager host creation.
18
18
- Support for Docker socket proxy.
19
19
@@ -28,14 +28,14 @@ PlugNPiN discovers services by scanning for Docker containers that have the foll
28
28
29
29
The application operates in two complementary modes to keep your services synchronized:
30
30
31
-
1.**Real-Time Event Listening**: The application actively listens for Docker container events. When a container with the required labels is **started**, **stopped**, or **killed**, the tool immediately adds or removes the corresponding DNS and proxy host entries. This ensures that your services are updated in real-time as containers change state.
31
+
1.**Real-Time Event Listening**: The application actively listens for Docker container events. When a container with the required labels is **started**, **stopped**, or **killed**, the tool immediately adds or removes the corresponding DNS and proxy host entries. This ensures that your services are updated in real-time as containers change state.
32
32
33
-
2.**Periodic Synchronization**: In addition to real-time events, the tool performs a full synchronization at a regular interval, defined by the `RUN_INTERVAL` environment variable. During this periodic run, it scans all running containers and ensures that their DNS and proxy configurations are correct. This acts as a self-healing mechanism, correcting any entries that might have been missed or become inconsistent.
33
+
2.**Periodic Synchronization**: In addition to real-time events, the tool performs a full synchronization at a regular interval, defined by the `RUN_INTERVAL` environment variable. During this periodic run, it scans all running containers and ensures that their DNS and proxy configurations are correct. This acts as a self-healing mechanism, correcting any entries that might have been missed or become inconsistent.
34
34
35
35
When a container is processed in either mode, PlugNPiN will:
36
36
37
-
1.Create a DNS record pointing the specified `url` to the `ip` address on **Pi-Hole**.
38
-
2.Create a proxy host to route traffic from the `url` to the container's `ip` and `port` on **Nginx Proxy Manager**.
37
+
1. Create a DNS record pointing the specified `url` to the `ip` address on **Pi-Hole** (or a CNAME record pointing to a configurable target domain).
38
+
2. Create a proxy host to route traffic from the `url` to the container's `ip` and `port` on **Nginx Proxy Manager**.
Copy file name to clipboardExpand all lines: docs/index.md
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
**Plug and play your docker containers into Pi-Hole & Nginx Proxy Manager**
8
8
9
9
Automatically detect running Docker containers based on labels, add them
10
-
as local DNS records in **Pi-Hole** and create matching proxy hosts in
10
+
as local DNS/[CNAME](#targetDomainLabel) records in **Pi-Hole** and create matching proxy hosts in
11
11
**Nginx Proxy Manager**.
12
12
13
13
## How It Works
@@ -25,9 +25,14 @@ The application operates in two complementary modes to keep your services synchr
25
25
26
26
When a container is processed in either mode, PlugNPiN will:
27
27
28
-
1. Create a DNS record pointing the specified `url` to the `ip` address on **Pi-Hole**.
28
+
1. Create a DNS record pointing the specified `url` to the `ip` address on **Pi-Hole** (or a [CNAME record](#targetDomainLabel) pointing to a configurable target domain).
29
29
2. Create a proxy host to route traffic from the `url` to the container's `ip` and `port` on **Nginx Proxy Manager**.
30
30
31
+
### CNAME Records
32
+
33
+
It is possible to force PlugNPiN to create CNAME records instead of local DNS records ("A record") in Pi-Hole by setting the `plugNPiN.piholeOptions.targetDomain` label.
34
+
See [Per Container Configuration ➔ Pi-Hole](#targetDomainLabel).
35
+
31
36
## Configuration
32
37
33
38
### Environment Variables
@@ -39,8 +44,8 @@ When a container is processed in either mode, PlugNPiN will:
39
44
|`NGINX_PROXY_MANAGER_HOST`| The URL of your Nginx Proxy Manager instance. |
40
45
|`NGINX_PROXY_MANAGER_USERNAME`| Your Nginx Proxy Manager username. |
41
46
|`NGINX_PROXY_MANAGER_PASSWORD`| Your Nginx Proxy Manager password. <br> **Important:** It is recommended to create a new non-admin user with only the "Proxy Hosts - Manage" permission. |
42
-
|`PIHOLE_HOST`| The URL of your Pi-hole instance. |
43
-
|`PIHOLE_PASSWORD`| Your Pi-hole password. <br> **Important:** It is recommended to create an 'application password' rather than using your actual admin password. |
47
+
|`PIHOLE_HOST`| The URL of your Pi-Hole instance. |
48
+
|`PIHOLE_PASSWORD`| Your Pi-Hole password. <br> **Important:** It is recommended to create an 'application password' rather than using your actual admin password. |
44
49
45
50
#### Optional
46
51
@@ -54,7 +59,7 @@ When a container is processed in either mode, PlugNPiN will:
54
59
55
60
| Flag {: style="width:35%" } | Description |
56
61
|---|---|
57
-
|`--dry-run`, `-d`| Simulates the process of adding DNS records and proxy hosts without making any actual changes to Pi-hole or Nginx Proxy Manager. |
62
+
|`--dry-run`, `-d`| Simulates the process of adding DNS/CNAME records and proxy hosts without making any actual changes to Pi-Hole or Nginx Proxy Manager. |
58
63
59
64
### Per Container Configuration
60
65
@@ -74,6 +79,12 @@ Use the following labels to configure Nginx Proxy Manager entries
74
79
|`plugNPiN.npmOptions.scheme`| The scheme used to forward traffic to the container. Can be `http` or `https`|`http`|
75
80
|`plugNPiN.npmOptions.websocketsSupport`| Enables or disables the "Allow Websocket Upgrade" option on the proxy host. Set to `true` or `false`|`false`|
0 commit comments