Skip to content

Commit

Permalink
Merge pull request #68 from cbundy/configure-remote-paths
Browse files Browse the repository at this point in the history
Configure remote paths
  • Loading branch information
mattwebbio authored Nov 6, 2022
2 parents ae1ef6a + 92c2339 commit ec653f7
Show file tree
Hide file tree
Showing 8 changed files with 302 additions and 122 deletions.
47 changes: 26 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ services:
SECONDARY_HOST_1_PASSWORD: 'your_password2'
SECONDARY_HOST_2_BASE_URL: 'http://192.168.1.3'
SECONDARY_HOST_2_PASSWORD: 'your_password3'
SECONDARY_HOST_3_BASE_URL: 'http://server:8080'
SECONDARY_HOST_3_PASSWORD: 'your_password4'
SECONDARY_HOST_3_PATH: '/apps/pi-hole'
INTERVAL_MINUTES: 30
```
Expand Down Expand Up @@ -80,27 +83,29 @@ It is recommended you run this service with Docker.

### Sync Configuration

| Environment Variable | Required | Default | Examples | Description |
| ----------------------------- | -------- | ------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `PRIMARY_HOST_BASE_URL` | Yes | N/A | `http://192.168.1.2` or `https://pihole.example.com` | The base URL of your Pi-hole, including the scheme (HTTP or HTTPS) and port but not including a following slash. |
| `PRIMARY_HOST_PASSWORD` | Yes | N/A | `mypassword` | The password used to log in to the admin interface. |
| `SECONDARY_HOST_(#)_BASE_URL` | Yes | N/A | `http://192.168.1.3` or `https://pihole2.example.com` | The base URL of your secondary Pi-hole, including the scheme (HTTP or HTTPS) and port but not including a following slash. Replace `(#)` with a number, starting at `1`, to add multiple secondary Pi-holes. |
| `SECONDARY_HOST_(#)_PASSWORD` | Yes | N/A | `mypassword2` | The password used to log in to the admin interface. |
| `INTERVAL_MINUTES` | No | 30 | Any non-zero positive integer, for example `5`, `30`, or `1440` | How long to wait between synchronizations. Defaults to five minutes. Remember that the DNS server on your secondary servers restarts everytime a sync is performed. |
| `UPDATE_GRAVITY` | No | `true` | `true`/`false` | Triggers a gravity update after a backup has been uploaded to a secondary Pi-hole. This updates adlists and restarts gravity. |
| `SYNC_WHITELIST` | No | `true` | `true`/`false` | Copies the whitelist |
| `SYNC_REGEX_WHITELIST` | No | `true` | `true`/`false` | Copies the regex whitelist |
| `SYNC_BLACKLIST` | No | `true` | `true`/`false` | Copies the blacklist |
| `SYNC_REGEXLIST` | No | `true` | `true`/`false` | Copies the regex blacklist |
| `SYNC_ADLIST` | No | `true` | `true`/`false` | Copies the adlist |
| `SYNC_CLIENT` | No | `true` | `true`/`false` | Copies clients |
| `SYNC_GROUP` | No | `true` | `true`/`false` | Copies groups |
| `SYNC_AUDITLOG` | No | `false` | `true`/`false` | Copies the audit log |
| `SYNC_STATICDHCPLEASES` | No | `false` | `true`/`false` | Copies static dhcp leases |
| `SYNC_LOCALDNSRECORDS` | No | `true` | `true`/`false` | Copies local DNS records |
| `SYNC_LOCALCNAMERECORDS` | No | `true` | `true`/`false` | Copies local CNAME records |
| `SYNC_FLUSHTABLES` | No | `true` | `true`/`false` | Clears existing data on the secondary (copy target) Pi-hole |
| `RUN_ONCE` | No | `false` | `true`/`false` | By default, `orbital-sync` runs indefinitely until stopped. Setting `RUN_ONCE` to `true` forces it to exit immediately after the first sync. |
| Environment Variable | Required | Default | Examples | Description |
| ----------------------------- | -------- | -------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `PRIMARY_HOST_BASE_URL` | Yes | N/A | `http://192.168.1.2` or `https://pihole.example.com` | The base URL of your Pi-hole, including the scheme (HTTP or HTTPS) and port but not including a following slash. |
| `PRIMARY_HOST_PATH` | No | `/admin` | `/` or `/apps/pi-hole` | The path to be appended to your base URL. The default Pi-hole path is `/admin`, which is added automatically. |
| `PRIMARY_HOST_PASSWORD` | Yes | N/A | `mypassword` | The password used to log in to the admin interface. |
| `SECONDARY_HOST_(#)_BASE_URL` | Yes | N/A | `http://192.168.1.3` or `https://pihole2.example.com` | The base URL of your secondary Pi-hole, including the scheme (HTTP or HTTPS) and port but not including a following slash. Replace `(#)` with a number, starting at `1`, to add multiple secondary Pi-holes. |
| `SECONDARY_HOST_(#)_PATH` | No | `/admin` | `/` or `/apps/pi-hole` | The path to be appended to your secondary base URL. The default Pi-hole path is `/admin`, which is added automatically. Replace `(#)` with a number, starting at `1`, to add multiple secondary Pi-holes. |
| `SECONDARY_HOST_(#)_PASSWORD` | Yes | N/A | `mypassword2` | The password used to log in to the admin interface. |
| `INTERVAL_MINUTES` | No | 30 | Any non-zero positive integer, for example `5`, `30`, or `1440` | How long to wait between synchronizations. Defaults to five minutes. Remember that the DNS server on your secondary servers restarts everytime a sync is performed. |
| `UPDATE_GRAVITY` | No | `true` | `true`/`false` | Triggers a gravity update after a backup has been uploaded to a secondary Pi-hole. This updates adlists and restarts gravity. |
| `SYNC_WHITELIST` | No | `true` | `true`/`false` | Copies the whitelist |
| `SYNC_REGEX_WHITELIST` | No | `true` | `true`/`false` | Copies the regex whitelist |
| `SYNC_BLACKLIST` | No | `true` | `true`/`false` | Copies the blacklist |
| `SYNC_REGEXLIST` | No | `true` | `true`/`false` | Copies the regex blacklist |
| `SYNC_ADLIST` | No | `true` | `true`/`false` | Copies the adlist |
| `SYNC_CLIENT` | No | `true` | `true`/`false` | Copies clients |
| `SYNC_GROUP` | No | `true` | `true`/`false` | Copies groups |
| `SYNC_AUDITLOG` | No | `false` | `true`/`false` | Copies the audit log |
| `SYNC_STATICDHCPLEASES` | No | `false` | `true`/`false` | Copies static dhcp leases |
| `SYNC_LOCALDNSRECORDS` | No | `true` | `true`/`false` | Copies local DNS records |
| `SYNC_LOCALCNAMERECORDS` | No | `true` | `true`/`false` | Copies local CNAME records |
| `SYNC_FLUSHTABLES` | No | `true` | `true`/`false` | Clears existing data on the secondary (copy target) Pi-hole |
| `RUN_ONCE` | No | `false` | `true`/`false` | By default, `orbital-sync` runs indefinitely until stopped. Setting `RUN_ONCE` to `true` forces it to exit immediately after the first sync. |

Secondary hosts must be sequential (`SECONDARY_HOST_1_BASE_URL`, `SECONDARY_HOST_2_BASE_URL`,
`SECONDARY_HOST_3_BASE_URL`, and so on) and start at number `1`. Any gaps (for example, `3` to `5` skipping `4`) will
Expand Down
Loading

0 comments on commit ec653f7

Please sign in to comment.