Sign inSign up

fzamperin/cron-cloudflare

By fzamperin

•Updated 3 months ago

Pilot project just to play with rust

Image
Integration & delivery
0

2.2K

fzamperin/cron-cloudflare repository overview

⁠Cron Cloudflare

Docker image that allows you to update your own domain entry at cloudflare with you remote ip, like a ddns but using cloudflare-api. Each time the container runs it verifies if the domain has changed, and only then updates with the remote ip available.

NOTE: This container only works with ipv4, ipv6 and domains that are hosted at cloudflare

⁠Getting Started

Config file example:

auth: "auth_token"
domains:
  - name: "foo.com"
    type_ip: A
    zone_id: zone_id
  - name: "foo.com"
    type_ip: AAAA
    zone_id: zone_id

Running container with docker-compose:

version: '3'

services:
  cloudflareddns:
    image: fzamperin/cron-cloudflare:latest
    network_mode: bridge //For the use of ipv6 it's important to create an ipv6 enabled network on docker, otherwise will not work
    environment:
      - CRON_PATTERN=0 */5 * ? * * //Cron pattern to run the job
    volumes:
      - /home/user/config/config.yaml:/config/config.yaml //config file with the token and domains to update
    restart: unless-stopped
⁠Prerequisities

In order to run this container you'll need docker installed.

⁠Environment Variables
  • CRON_PATTERN - The cron pattern to run the job, scheduling the process
⁠Volumes
  • /home/user/config.yaml - File location for the configuration file

⁠Built With

  • Rust 1.66

⁠Versioning

We use SemVer⁠ for versioning. For the versions available, see the tags on this repository⁠.

⁠Authors

  • Fernando Penna - Initial work

Tag summary

Content type

Image

Digest

sha256:1db90d53e…

Size

31.6 MB

Last updated

3 months ago

docker pull fzamperin/cron-cloudflare:0.0.9