GithubHelp home page GithubHelp logo

mrpk1906 / cf-sync Goto Github PK

View Code? Open in Web Editor NEW

This project forked from siennathesane/cloudflare-sync

0.0 0.0 0.0 37 KB

A nice to have, MIT-licensed tool for using Cloudflare as a dynamic DNS provider.

License: MIT License

Dockerfile 1.27% Go 98.73%

cf-sync's Introduction

cf-sync

Go Report Card

A nice to have, MIT-licensed tool for using Cloudflare as a dynamic DNS provider.

Notice

This project was forked from cloudflare-sync. I made some changes to fit my requirements.

Usage

Before you get started, ensure that you have a Cloudflare site (one or more, doesn't matter since it's by Zone ID) so records can be updated. Leveraging the config/example.json, create a file that you want to contain your own DNS A records. Run go build -v ./cmd -o cloudflare-sync.exe, then leverage cloudflare-sync.exe -h for the specifics.

Currently, this is undergoing an overhaul, so please feel to provide some feedback on its changes.

Configuration

The configuration is file-based, you can find an example of the schema in config/example.json. You need to pass this file via a flag, which you can find with cloudflare-sync.exe --help. This file is a subset of the Cloudflare API, so if you don't want it to override the values you already have in Cloudflare, just make sure they match. Please feel free to update this configuration section with more commentary if my explanation isn't satisfactory.

Docker

There is a Dockerfile you can use to push to your own registry, if you want. Here is a template command you'll want:

docker run \
    -ti \
    -e "API_TOKEN=''" \
    -e "ZONE_ID=''" \
    -e "FREQUENCY=30" \
    -e "RECORDS_FILE_NAME=production.json" \
    <your-image>

Don't forget to pass in your own production.json file via docker volumes.

Kubernetes

There is a kubernetes.yml file which you can use to deploy a ConfigMap and Deployment for this. You shouldn't ever need more than one replica. Fill out the ConfigMap, spec.template.spec.containers[0].env values, and data.production.json with your configuration.

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.