Coder Social home page Coder Social logo

qrkdns's Introduction

QRKDNS

This agent automatically discovers the current host's external IP address, and updates a given DNS A record in Cloudflare with the value.

Getting Started

Installation

Docker

Instead of installing directly, you can use the Docker images:

Name Description
ghcr.io/markliederbach/qrkdns Basic image
markliederbach/qrkdns Dockerhub mirror

A note about .env files and docker. The --env-file option only takes env files that do not have quotations. If quotes are present, they won't parse the options correctly. It is recommended that you create a separate file called .env.docker, which doesn't use any quotations.

Examples

Sync Once

docker run --env-file .env.docker --rm -it  ghcr.io/markliederbach/qrkdns:latest sync
  • The .env.docker file should contain the following required environment variables
    • NETWORK_ID - The subdomain to update in Cloudflare (e.g., myhost)
    • DOMAIN_NAME - The base domain name (e.g., foo.net)
    • CLOUDFLARE_ACCOUNT_ID - Account ID from Cloudflare
    • CLOUDFLARE_API_TOKEN - Secret API token, with permission to read/update DNS records

Sync Cron

docker run --env-file .env.docker --rm -it  ghcr.io/markliederbach/qrkdns:latest sync cron
  • The .env.docker file should contain the following required environment variables
    • NETWORK_ID - The subdomain to update in Cloudflare (e.g., myhost)
    • DOMAIN_NAME - The base domain name (e.g., foo.net)
    • CLOUDFLARE_ACCOUNT_ID - Account ID from Cloudflare
    • CLOUDFLARE_API_TOKEN - Secret API token, with permission to read/update DNS records
    • SCHEDULE - Cron pattern describing how often the sync job should be run

Local Development

To develop on the source code, you'll need to install a few requisite packages:

With task, and a compatible version of go, you can now run the following task to install project dependencies:

task deps

Testing

This application requires 100% code coverage on most files for all PRs and new Releases. To run the test suite, use this task:

task test

Linting

task lint

qrkdns's People

Contributors

markliederbach avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar

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.