Giter VIP home page Giter VIP logo

docker-traefik-cloudflare-companion's Introduction

hub.docker.com/r/tiredofit/traefik-cloudflare-companion

Docker Cloud Build Status Docker Pulls Docker Stars Docker Layers

Introduction

Dockerfile to build a Container to automatically update Cloudflare DNS records upon container start. A time saver if you are regularly moving containers around to different systems. This will allow you to set multiple zone's you wish to update.

  • This Container uses a customized Alpine Linux base which includes s6 overlay enabled for PID 1 Init capabilities, zabbix-agent compiled for individual container monitoring, Cron also installed along with other tools (bash,curl, less, logrotate, nano, vim) for easier management. It also supports sending to external SMTP servers..

Changelog

Authors

Table of Contents

Prerequisites

This image assumes that you are using a reverse proxy such as tiredofit/traefik

Installation

Automated builds of the image are available on Docker Hub and is the recommended method of installation.

docker pull tiredofit/traefik-cloudflare-companion:(imagetag)
  • latest - Most recent release w/Python 2 and Alpine 3.9

Quick Start

Upon startup the image looks for a label containing traefik.frontend.rule from your running containers of either updates Cloudflare with a CNAME record of your TARGET_DOMAIN. Previous versions of this container used to only update one Zone, however with the additional of the DOMAIN environment variables it now parses the containers variables and updates the appropriate zone.

Configuration

Volumes

File Description
/var/run/docker.sock You must have access to the docker socket in order to utilize this image

Environment Variables

Along with the Environment Variables from the Base image, below is the complete list of available options that can be used to customize your installation. By Default Cron and SMTP are disabled.

Parameter Description
DOCKER_ENTRYPOINT Docker Entrypoint default unix://var/run/docker.sock
CF_EMAIL Your Cloudflare Email Address
CF_TOKEN Token for the Domain
DEFAULT_TTL TTL to apply to records - Default 120
TARGET_DOMAIN Destination Host to forward records to e.g. ``host.example.com`
DOMAIN1 Domain 1 you wish to update records for.
DOMAIN1_ZONE_ID Domain 1 Zone ID from Cloudflare
DOMAIN1_PROXIED Domain 1 True of False if proxied
DOMAIN2 (optional Domain 2 you wish to update records for.
DOMAIN2_ZONE_ID Domain 2 Zone ID from Cloudflare
DOMAIN2_PROXIED Domain 1 True of False if proxied
DOMAIN3.... And so on..

Maintenance

Shell Access

For debugging and maintenance purposes you may want access the containers shell.

docker exec -it (whatever your container name is e.g. traefik-cloudflare-companion) bash

References

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.