https://github.com/k-foss/pfcarper
Script to automatically assign a DigitalOcean floating IP to droplets with a tag when the currently active droplet stops responding on the TCP port.
https://github.com/k-foss/pfcarper
digitalocean digitalocean-droplets pfsense
Last synced: 2 months ago
JSON representation
Script to automatically assign a DigitalOcean floating IP to droplets with a tag when the currently active droplet stops responding on the TCP port.
- Host: GitHub
- URL: https://github.com/k-foss/pfcarper
- Owner: K-FOSS
- Created: 2020-02-14T00:44:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-27T23:47:55.000Z (about 2 years ago)
- Last Synced: 2025-02-09T23:12:44.235Z (4 months ago)
- Topics: digitalocean, digitalocean-droplets, pfsense
- Language: TypeScript
- Homepage:
- Size: 48.8 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pfCarper
pfCarper is a script designed to be run to test and automatically allocate a DigitalOcean floating IP to the next Droplet that the TCP Port test succeed
## Usage
**Envirnonment Variables**
| Variable | Description | Default |
| :-------------------- | ------------------------------------------------------------------------ | ------- |
| `DIGITAL_OCEAN_TOKEN` | DigitalOcean API Token | |
| `DROPLET_TAG` | Tag applied to the droplets you want to have the floating IP assigned to | |
| `FLOATING_IP` | Floating IP Address to assign to droplets | |
| `INTERVAL` | Optional seconds interval at which to tcp test the droplets | 5 |
| `PORT` | Port to do the TCP test agaisnt | 443 |I designed this script to run in a `docker-compose.yml` file on one of my DigitalOcean VPSes.
```YAML
version: '3.7'services:
pfCarper:
image: docker.pkg.github.com/k-foss/pfcarper/pfcarper
environment:
DIGITAL_OCEAN_TOKEN: 'INSERT_DIGITAL_OCEAN_TOKEN'
FLOATING_IP: 'INSERT_FLOATING_IP'
DROPLET_TAG: 'pfCarper-Core'
# OPTIONAL
# PORT: '80'
# INTERVAL: '10'
```