{"id":18289814,"url":"https://github.com/tiredofit/docker-nginx-proxy-cloudflare-companion","last_synced_at":"2025-04-05T09:31:46.684Z","repository":{"id":40276570,"uuid":"102285863","full_name":"tiredofit/docker-nginx-proxy-cloudflare-companion","owner":"tiredofit","description":"Automatically update CNAME records when Docker container starts via Cloudflare","archived":false,"fork":false,"pushed_at":"2024-07-05T15:02:39.000Z","size":55,"stargazers_count":35,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-21T02:21:54.475Z","etag":null,"topics":["cloudflare","cname","dns","docker","jwilder","nginx-proxy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tiredofit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["tiredofit"]}},"created_at":"2017-09-03T18:34:36.000Z","updated_at":"2025-01-11T05:59:59.000Z","dependencies_parsed_at":"2023-02-16T11:15:59.883Z","dependency_job_id":null,"html_url":"https://github.com/tiredofit/docker-nginx-proxy-cloudflare-companion","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiredofit%2Fdocker-nginx-proxy-cloudflare-companion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiredofit%2Fdocker-nginx-proxy-cloudflare-companion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiredofit%2Fdocker-nginx-proxy-cloudflare-companion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiredofit%2Fdocker-nginx-proxy-cloudflare-companion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tiredofit","download_url":"https://codeload.github.com/tiredofit/docker-nginx-proxy-cloudflare-companion/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247318269,"owners_count":20919457,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare","cname","dns","docker","jwilder","nginx-proxy"],"created_at":"2024-11-05T14:08:23.032Z","updated_at":"2025-04-05T09:31:43.078Z","avatar_url":"https://github.com/tiredofit.png","language":"Python","funding_links":["https://github.com/sponsors/tiredofit","https://www.paypal.me/tiredofit"],"categories":["Python"],"sub_categories":[],"readme":"# github.com/tiredofit/docker-nginx-proxy-cloudflare-companion\n\n[![GitHub release](https://img.shields.io/github/v/tag/tiredofit/docker-nginx-proxy-cloudflare-companion?style=flat-square)](https://github.com/tiredofit/docker-nginx-proxy-cloudflare-companion/releases/latest)\n[![Build Status](https://img.shields.io/github/workflow/status/tiredofit/docker-nginx-proxy-cloudflare-companion/build?style=flat-square)](https://github.com/tiredofit/docker-nginx-proxy-cloudflare-companion/actions?query=workflow%3Abuild)\n[![Docker Stars](https://img.shields.io/docker/stars/tiredofit/nginx-proxy-cloudflare-companion.svg?style=flat-square\u0026logo=docker)](https://hub.docker.com/r/tiredofit/nginx-proxy-cloudflare-companion/)\n[![Docker Pulls](https://img.shields.io/docker/pulls/tiredofit/nginx-proxy-cloudflare-companion.svg?style=flat-square\u0026logo=docker)](https://hub.docker.com/r/tiredofit/nginx-proxy-cloudflare-companion/)\n[![Become a sponsor](https://img.shields.io/badge/sponsor-tiredofit-181717.svg?logo=github\u0026style=flat-square)](https://github.com/sponsors/tiredofit)\n[![Paypal Donate](https://img.shields.io/badge/donate-paypal-00457c.svg?logo=paypal\u0026style=flat-square)](https://www.paypal.me/tiredofit)\n\n* * *\n## About\n\nThis builds a Docker image 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.\n\n## Maintainer\n\n- [Dave Conroy](http://github/tiredofit/)\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Authors](#authors)\n- [Table of Contents](#table-of-contents)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n  - [Quick Start](#quick-start)\n- [Configuration](#configuration)\n  - [Volumes](#volumes)\n  - [Environment Variables](#environment-variables)\n  - [Docker Secrets](#docker-secrets)\n- [Maintenance](#maintenance)\n  - [Shell Access](#shell-access)\n- [References](#references)\n\n## Prerequisites and Assumptions\n*  Assumes you are using Nginx as a reverse proxy:\n   *  [Nginx-Proxy](https://github.com/jwilder/nginx-proxy)\n\n## Installation\n### Build from Source\nClone this repository and build the image with `docker build -t (imagename) .`\n\n### Prebuilt Images\nBuilds of the image are available on [Docker Hub](https://hub.docker.com/r/tiredofit/traefik-cloudflare-companion) and is the recommended method of installation.\n\n```bash\ndocker pull tiredofit/traefik-cloudflare-companion:(imagetag)\n```\nThe following image tags are available along with their tagged release based on what's written in the [Changelog](CHANGELOG.md):\n\n| Container OS | Tag       |\n| ------------ | --------- |\n| Alpine       | `:latest` |\n\n#### Multi Architecture\nImages are built primarily for `amd64` architecture, and may also include builds for `arm/v6`, `arm/v7`, `arm64` and others. These variants are all unsupported. Consider [sponsoring](https://github.com/sponsors/tiredofit) my work so that I can work with various hardware. To see if this image supports multiple architecures, type `docker manifest (image):(tag)`\n\n## Configuration\n\n### Quick Start\n\n* The quickest way to get started is using [docker-compose](https://docs.docker.com/compose/). See the examples folder for a working [docker-compose.yml](examples/docker-compose.yml) that can be modified for development or production use.\n\n* Set various [environment variables](#environment-variables) to understand the capabilities of this image.\n\nUpon startup the image looks for a label containing `traefik.frontend.rule` (version 1) or `Host*` (version2) 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.\n\nFor those wishing to assign multiple CNAMEs to a container use the following format:\n### Volumes\n| File                   | Description                                                              |\n| ---------------------- | ------------------------------------------------------------------------ |\n| `/var/run/docker.sock` | You must have access to the docker socket in order to utilize this image |\n\n### Environment Variables\n\n#### Base Images used\n\nThis image relies on an [Alpine Linux](https://hub.docker.com/r/tiredofit/alpine) or [Debian Linux](https://hub.docker.com/r/tiredofit/debian) base image that relies on an [init system](https://github.com/just-containers/s6-overlay) for added capabilities. Outgoing SMTP capabilities are handlded via `msmtp`. Individual container performance monitoring is performed by [zabbix-agent](https://zabbix.org). Additional tools include: `bash`,`curl`,`less`,`logrotate`, `nano`,`vim`.\n\nBe sure to view the following repositories to understand all the customizable options:\n\n| Image                                                  | Description                            |\n| ------------------------------------------------------ | -------------------------------------- |\n| [OS Base](https://github.com/tiredofit/docker-alpine/) | Customized Image based on Alpine Linux |\n\n\n| Parameter           | Description                                                                             | Default                      |\n| ------------------- | --------------------------------------------------------------------------------------- | ---------------------------- |\n| `DOCKER_ENTRYPOINT` | Docker Entrypoint default (local mode)                                                  | `unix://var/run/docker.sock` |\n| `DOCKER_HOST`       | (optional) If using tcp connection e.g. `tcp://111.222.111.32:2376`                     |                              |\n| `DOCKER_CERT_PATH`  | (optional) If using tcp connection with TLS - Certificate location e.g. `/docker-certs` |                              |\n| `DOCKER_TLS_VERIFY` | (optional) If using tcp conneciton to socket Verify TLS                                 | `1`                          |\n| `REFRESH_ENTRIES`   | If record exists, update entry with new values `TRUE` or `FALSE`                        | `TRUE`                       |\n| `SWARM_MODE`        | Enable Docker Swarm Mode `TRUE` or `FALSE`                                              | `FALSE`                      |\n| `CF_EMAIL`          | Email address tied to Cloudflare Account - Leave Blank  for Scoped API                  |                              |\n| `CF_TOKEN`          | API Token for the Domain                                                                |                              |\n| `DEFAULT_TTL`       | TTL to apply to records                                                                 | `1`                          |\n| `TARGET_DOMAIN`     | Destination Host to forward records to e.g. `host.example.com`                          |                              |\n| `DOMAIN1`           | Domain 1 you wish to update records for.                                                |                              |\n| `DOMAIN1_ZONE_ID`   | Domain 1 Zone ID from Cloudflare                                                        |                              |\n| `DOMAIN1_PROXIED`   | Domain 1 True or False if proxied                                                       |                              |\n| `DOMAIN2`           | (optional Domain 2 you wish to update records for.)                                     |                              |\n| `DOMAIN2_ZONE_ID`   | Domain 2 Zone ID from Cloudflare                                                        |                              |\n| `DOMAIN2_PROXIED`   | Domain 1 True or False if proxied                                                       |                              |\n| `DOMAIN3....`       | And so on..                                                                             |                              |\n\n### Docker Secrets\n\n`CF_EMAIL` and `CF_TOKEN` support Docker Secrets\nName your secrets either CF_EMAIL and CF_TOKEN or cf_email and cf_token.\n\n\n* * *\n## Maintenance\n### Shell Access\n\nFor debugging and maintenance purposes you may want access the containers shell.\n\n```bash\ndocker exec -it (whatever your container name is e.g. traefik-cloudflare-companion) bash\n```\n\n## Support\n\nThese images were built to serve a specific need in a production environment and gradually have had more functionality added based on requests from the community.\n### Usage\n- The [Discussions board](../../discussions) is a great place for working with the community on tips and tricks of using this image.\n- Consider [sponsoring me](https://github.com/sponsors/tiredofit) personalized support.\n### Bugfixes\n- Please, submit a [Bug Report](issues/new) if something isn't working as expected. I'll do my best to issue a fix in short order.\n\n### Feature Requests\n- Feel free to submit a feature request, however there is no guarantee that it will be added, or at what timeline.\n- Consider [sponsoring me](https://github.com/sponsors/tiredofit) regarding development of features.\n\n### Updates\n- Best effort to track upstream changes, More priority if I am actively using the image in a production environment.\n- Consider [sponsoring me](https://github.com/sponsors/tiredofit) for up to date releases.\n\n## License\nMIT. See [LICENSE](LICENSE) for more details.\n\n## References\n\n* https://www.cloudflare.com\n* https://github.com/tiredofit/docker-traefik-cloudflare-companion\n* https://github.com/code5-lab/dns-flare\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiredofit%2Fdocker-nginx-proxy-cloudflare-companion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiredofit%2Fdocker-nginx-proxy-cloudflare-companion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiredofit%2Fdocker-nginx-proxy-cloudflare-companion/lists"}