Coder Social home page Coder Social logo

thefatpanda97 / netlify-dynamic-dns Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 700 KB

A client to support dynamic DNS for Netlify

Home Page: https://hub.docker.com/repository/docker/tfpanda97/netlify-ddns/general

JavaScript 10.60% TypeScript 88.41% SCSS 0.70% Dockerfile 0.29%

netlify-dynamic-dns's Introduction

Netlify Dynamic DNS

Since Netlify does not support dynamic dns, this is a simple client written in Next js to support this functionality. To achieve, we are utlizing the public netlify api.

Supported Functionality

  • CRUD operations on A records
  • assign a Record to be updated automatically to the current machine's public address based on provided CRON interval

Configuration

Environment Variable Description
NETLIFY_API_KEY your access token for netlify, you can generate one here
POSTGRES_USER postgres user name for the postgres database
POSTGRES_PASSWORD postgres user password for the postgres database
POSTGRES_HOST host of the postgres database
CRON_INTERVAL interval for the DDNS to update the public IP records

Local Usage

Prerequistes

  • local postgres server
  • creat a database called ddns

Steps

  1. git clone https://github.com/TheFatPanda97/netlify-dynamic-dns.git
  2. npm ci
  3. create and configure .env with the environment varaibles in configuration
  4. npm run build
  5. npm run start

Docker Usage

---
version: "3"

volumes:
  ddns_db_volume:

services:
  ddns:
    image: tfpanda97/netlify-ddns:latest
    environment:
      - NETLIFY_API_KEY=your_key
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=password
      - POSTGRES_HOST=db
      - CRON_INTERVAL=0 * * * * # the cron job will execute every hour to update the indicated records to be the public ip address of the host machine
    ports:
      - 3000:3000
    depends_on:
      - db

  db:
    image: postgres
    restart: always
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB=ddns
    ports:
      - 5432:5432
    volumes:
      - ddns_db_volume:/var/lib/postgresql/data

netlify-dynamic-dns's People

Contributors

thefatpanda97 avatar

Stargazers

 avatar

Watchers

 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.