mirror of
https://github.com/Akarys42/cloudflare-ddns-docker.git
synced 2025-05-10 16:55:17 -06:00
Compare commits
70 Commits
main
...
bc3a76319b
Author | SHA1 | Date | |
---|---|---|---|
bc3a76319b | |||
06894c215c | |||
deee8da21f | |||
1800c200f2 | |||
fcc03ee33a | |||
850333b7c0 | |||
a9d2dbab3e | |||
889fdba885 | |||
17b3ebe923 | |||
2a5406e0e4 | |||
bb22e6e779 | |||
d4e0141c8f | |||
f3f48f1575 | |||
d71fe03e42 | |||
8afe81c5d3 | |||
661ed95304 | |||
8d0c44e574 | |||
20403b84fd | |||
30fa0165b8 | |||
4390d59232 | |||
8b886326a7 | |||
7ecc1eb55c | |||
237812f6bc | |||
88fa40ab55 | |||
84141df93f | |||
a250debcda | |||
82d3e040a8 | |||
fb1b934863 | |||
7f08f77706 | |||
80a68d0d3a | |||
54347827bb | |||
f6ee2d82e2 | |||
a6712d3372 | |||
33e87640f6 | |||
7b457440fc | |||
03e5d3d02f | |||
2de766cf38 | |||
0fdd3e7ed9 | |||
efaaf7a648 | |||
f411810e96 | |||
90dc4efa73 | |||
e6e0f7b92b | |||
26b7736fb1 | |||
e8d9c43b33 | |||
ffc7708cd3 | |||
86fe033d7d | |||
85dd9332c0 | |||
b09b8837c9 | |||
d7a1736ddf | |||
a781f2cd80 | |||
3e4d6156c7 | |||
ef4b86c132 | |||
ce76fa87ed | |||
55d0ec44c0 | |||
f154083f07 | |||
199763f50e | |||
6905b2adab | |||
304ba2a48a | |||
5201dfa2d4 | |||
ae038ca034 | |||
4f7f3f243c | |||
4b169c2051 | |||
9b24129760 | |||
bb916ed3c1 | |||
35da9d30b2 | |||
753b3523c6 | |||
0743d7fa6d | |||
6ac289ccf1 | |||
fa8d5c1c61 | |||
bbc042a642 |
30
.gitea/workflows/build.yaml
Normal file
30
.gitea/workflows/build.yaml
Normal file
@ -0,0 +1,30 @@
|
||||
name: Build Docker Image
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.home.timatlee.com
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: git.home.timatlee.com/timatlee/cloudflare-ddns:latest
|
19
.gitea/workflows/demo.yaml.donotuse
Normal file
19
.gitea/workflows/demo.yaml.donotuse
Normal file
@ -0,0 +1,19 @@
|
||||
name: Gitea Actions Demo
|
||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
Explore-Gitea-Actions:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
||||
- name: List files in the repository
|
||||
run: |
|
||||
ls ${{ gitea.workspace }}
|
||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
1
.sops.yaml
Normal file
1
.sops.yaml
Normal file
@ -0,0 +1 @@
|
||||
[]
|
@ -1,4 +1,4 @@
|
||||
FROM python:3.9-slim
|
||||
FROM python:3.13-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
50
README.md
50
README.md
@ -5,44 +5,72 @@
|
||||
[](LICENSE)
|
||||
|
||||
|
||||
Cloudflare DDNS is a configurable Docker service updating your CloudFlare DNS records periodically
|
||||
to match your local IP address.
|
||||
Cloudflare DDNS is a configurable Docker service updating your CloudFlare DNS records periodically
|
||||
to match your local IP address.
|
||||
|
||||
# Table of Content
|
||||
|
||||
- [Installation](#installation)
|
||||
- [Cloudflare DDNS](#cloudflare-ddns)
|
||||
- [Table of Content](#table-of-content)
|
||||
- [Installation](#installation)
|
||||
- [Using a Pre-built Container](#using-a-pre-built-container)
|
||||
- [Building the Container Yourself](#building-the-container-yourself)
|
||||
- [Hosting](#hosting)
|
||||
- [Running on the Host](#running-on-the-host)
|
||||
- [Configuration](#configuration)
|
||||
- [Configuration](#configuration)
|
||||
- [Getting a Cloudflare Token](#getting-a-cloudflare-token)
|
||||
- [Supported Options](#supported-options)
|
||||
- [Contributing](#contributing)
|
||||
- [Contributing](#contributing)
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
While this project is intended to be ran as a Docker container, it can also be ran on the host directly.
|
||||
|
||||
This container runs until terminated. It is not a cron job.
|
||||
|
||||
### Using a Pre-built Container
|
||||
|
||||
This project is available on the GitHub Container Registry.
|
||||
```
|
||||
docker pull ghcr.io/akarys42/cloudflare-ddns-docker
|
||||
```shell
|
||||
docker pull git.home.timatlee.com/timatlee/cloudflare-ddns:latest
|
||||
```
|
||||
|
||||
### Building the Container Yourself
|
||||
|
||||
There are no special requirements when building this container! Simply use `docker build` in this folder.
|
||||
There are no special requirements when building this container. Simply build with:
|
||||
|
||||
```shell
|
||||
docker build -t git.home.timatlee.com/timatlee/cloudflare-ddns:latest .
|
||||
docker push git.home.timatlee.com/timatlee/cloudflare-ddns:latest
|
||||
```
|
||||
|
||||
#### Hosting
|
||||
|
||||
I am hosting this in my own Gitea repository. We can push this with:
|
||||
|
||||
```shell
|
||||
docker login git.home.timatlee.com
|
||||
username: timatlee
|
||||
password: // Gitea PAT token
|
||||
```
|
||||
|
||||
### Running on the Host
|
||||
|
||||
Python > 3.12 is required. This likely requires a virtualenv.
|
||||
|
||||
```shell
|
||||
python -m venv .env
|
||||
.env\scripts\activate.ps1
|
||||
pip install -r requirements.txt
|
||||
python -m cloudflare_ddns --token ... -d .. domain.example.com
|
||||
```
|
||||
|
||||
In order to run this project on the host, you'll need Python > 3.8, and an environment containing
|
||||
the dependencies listed in [`requirements.txt`](requirements.txt).
|
||||
the dependencies listed in [`requirements.txt`](requirements.txt).
|
||||
|
||||
The project can then by launched by running the `cloudflare_ddns` module, usually using `python -m cloudflare_ddns`.
|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
This project will accept parameters through environment variables or command line argument.
|
||||
@ -71,5 +99,5 @@ Otherwise any found A or AAAA record pointing to this domain found will be used.
|
||||
|
||||
## Contributing
|
||||
|
||||
Any help would be greatly appreciated!
|
||||
Any help would be greatly appreciated!
|
||||
Feel free to check our [open issues](https://github.com/Akarys42/cloudflare-ddns-docker/issues) and send us a Pull Request!
|
||||
|
@ -1,13 +1,14 @@
|
||||
import logging
|
||||
from os import environ
|
||||
from typing import Tuple
|
||||
from dotenv import load_dotenv
|
||||
|
||||
import click
|
||||
from cloudflare_ddns.app import ApplicationJob
|
||||
from cloudflare_ddns.constants import BASE_ENV_VAR, DEFAULT_DELAY, DOMAINS_ENV_VAR
|
||||
|
||||
log = logging.getLogger("ddns")
|
||||
|
||||
load_dotenv()
|
||||
|
||||
@click.command()
|
||||
@click.option(
|
||||
|
@ -1,5 +1,4 @@
|
||||
## Development docker-compose
|
||||
version: "3.7"
|
||||
services:
|
||||
cloudflare-ddns:
|
||||
build:
|
||||
|
9
renovate.json
Normal file
9
renovate.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
|
||||
"forkProcessing": "enabled",
|
||||
|
||||
"ignorePaths": [
|
||||
".github"
|
||||
]
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
flake8~=3.8.4
|
||||
flake8-annotations~=2.4.1
|
||||
flake8-bugbear~=20.1.4
|
||||
flake8-docstrings~=1.5.0
|
||||
flake8~=7.1.0
|
||||
flake8-annotations~=3.1.1
|
||||
flake8-bugbear~=24.12.12
|
||||
flake8-docstrings~=1.7.0
|
||||
flake8-import-order~=0.18.1
|
||||
flake8-string-format~=0.3.0
|
||||
flake8-tidy-imports~=4.1.0
|
||||
flake8-tidy-imports~=4.11.0
|
||||
flake8-todo~=0.7
|
||||
pep8-naming~=0.11.1
|
||||
pep8-naming~=0.14.1
|
||||
|
@ -1,2 +1,9 @@
|
||||
requests~=2.25.1
|
||||
click8~=8.0.1
|
||||
certifi==2024.12.14
|
||||
chardet==5.2.0
|
||||
charset-normalizer==3.4.1
|
||||
click==8.1.8
|
||||
colorama==0.4.6
|
||||
idna==3.10
|
||||
python-dotenv==1.0.1
|
||||
requests==2.32.3
|
||||
urllib3==2.3.0
|
||||
|
Reference in New Issue
Block a user