Code Monkey home page Code Monkey logo

gandi-livedns's Introduction

gandi-livedns

The purpose of this container is to update DNS zone records using Gandi's LiveDNS (http://doc.livedns.gandi.net/) with your WAN IP.

This image is extremely lightweight (Alpine Linux based) and has very few dependencies. The actual DNS update program is coded in shell script only.

Warning : update scripts have been updated to use Gandi's Personal Access Tokens (PATs).

You need to create a new Personal Access Token for this application, with at least the "Manage domain name technical configurations" premissions. See https://api.gandi.net/docs/authentication/

Configuration

Mandatory variables:

  • GANDI_PAT: your Gandi Personal Acces Token (be sure to enable "Manage domain name technical configurations")
  • APIKEY: deprecated provided for backward compatibility. Value will be used as GANDI_PAT if provided
  • DOMAIN: your Gandi domain
  • RECORD_LIST: DNS records to update separated by ";"

Optional variables :

  • REFRESH_INTERVAL: Delay between updates in seconds (default: 10mn)
  • TTL: Set Time To Live for records (default: 300)
  • SET_IPV4: Update A record (default: yes)
  • SET_IPV6: Update AAAA record (default: no)
  • FORCE_IPV4: Force the IPv4 address to be used in DNS A records
  • FORCE_IPV6: Force the IPv6 address to be used in DNS AAAA records

Examples

The easiest way to run gandi-livedns is simply to docker run it from a computer in your network, leaving it running in the background with all the default settings.

docker run -d \
	-e "GANDI_PAT=<YOUR_VERY_SECRET_PERSONAL_ACCESS_TOKEN>" \
	-e "RECORD_LIST=blog;www;@" \
	-e "DOMAIN=your-gandi-hosted-domain.com" \
	jbbodart/gandi-livedns

This will update blog.your-gandi-hosted-domain.com, www.your-gandi-hosted-domain.com, and your-gandi-hosted-domain.com with your internet-facing IP (IPv4) every 10 minutes

An equivalent setup using docker-compose could look like this:
docker-compose.yml

version: '3.7'
...
    services:
    ...
        dyndns:
            image: jbbodart/gandi-livedns
            restart: unless-stopped
            env_file:
                - "dyndns.env"

dyndns.env

GANDI_PAT=<YOUR_VERY_SECRET_PERSONAL_ACCESS_TOKEN>
RECORD_LIST=blog;www;@
DOMAIN=your-gandi-hosted-domain.com

gandi-livedns's People

Contributors

g-eos avatar jbbodart avatar tiagosimao-truphone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gandi-livedns's Issues

REFRESH_INTERVAL instructions

Hi,

Great container, thank you very much for making it :)

You need to make a small tweak to the documentation.

From ...

REFRESH_INTERVAL: Delay between updates (default: 10mn)

To ...

REFRESH_INTERVAL: Delay between updates (default: 10m). This uses the Linux sleep command with a valid NUMBER and SUFFIX. SUFFIX may be 's' for seconds (the default), 'm' for minutes, 'h' for hours or 'd' for days. For example, 10m for 10 minutes.

Regards,

Paully

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.