35 Commits

Author SHA1 Message Date
03e5d3d02f Merge pull request 'Update dependency urllib3 to v2.2.2' (#21) from renovate/urllib3-2.x into main
Reviewed-on: https://git.home.timatlee.com/timatlee/cloudflare-ddns-docker-updated/pulls/21
2024-06-17 08:40:55 -06:00
2de766cf38 Update dependency urllib3 to v2.2.2 2024-06-17 14:00:22 +00:00
0fdd3e7ed9 Merge pull request 'Update dependency flake8 to ~=7.1.0' (#20) from renovate/flake8-7.x into main
Reviewed-on: https://git.home.timatlee.com/timatlee/cloudflare-ddns-docker-updated/pulls/20
2024-06-15 16:01:09 -06:00
efaaf7a648 Update dependency flake8 to ~=7.1.0 2024-06-15 22:00:16 +00:00
f411810e96 Merge pull request 'Update dependency flake8 to v7' (#13) from renovate/flake8-7.x into main
Reviewed-on: https://git.home.timatlee.com/timatlee/cloudflare-ddns-docker-updated/pulls/13
2024-06-11 19:00:46 -06:00
90dc4efa73 Update dependency flake8 to v7 2024-06-12 01:00:16 +00:00
e6e0f7b92b Merge pull request 'Update dependency flake8-tidy-imports to ~=4.10.0' (#7) from renovate/flake8-tidy-imports-4.x into main
Reviewed-on: https://git.home.timatlee.com/timatlee/cloudflare-ddns-docker-updated/pulls/7
2024-06-11 18:43:26 -06:00
26b7736fb1 Merge pull request 'Update dependency flake8-docstrings to ~=1.7.0' (#6) from renovate/flake8-docstrings-1.x into main
Reviewed-on: https://git.home.timatlee.com/timatlee/cloudflare-ddns-docker-updated/pulls/6
2024-06-11 18:43:15 -06:00
e8d9c43b33 Merge pull request 'Update dependency flake8-annotations to v3' (#14) from renovate/flake8-annotations-3.x into main
Reviewed-on: https://git.home.timatlee.com/timatlee/cloudflare-ddns-docker-updated/pulls/14
2024-06-11 18:43:00 -06:00
ffc7708cd3 Update dependency flake8-annotations to v3 2024-06-12 00:42:07 +00:00
86fe033d7d Update dependency flake8-docstrings to ~=1.7.0 2024-06-12 00:42:00 +00:00
85dd9332c0 Merge pull request 'Update dependency pep8-naming to ~=0.14.1' (#8) from renovate/pep8-naming-0.x into main
Reviewed-on: https://git.home.timatlee.com/timatlee/cloudflare-ddns-docker-updated/pulls/8
2024-06-11 18:41:13 -06:00
b09b8837c9 Merge pull request 'Update dependency flake8 to ~=3.9.2' (#3) from renovate/flake8-3.x into main
Reviewed-on: https://git.home.timatlee.com/timatlee/cloudflare-ddns-docker-updated/pulls/3
2024-06-11 18:40:59 -06:00
d7a1736ddf Merge pull request 'Update dependency click to v8.1.7' (#2) from renovate/click-8.x into main
Reviewed-on: https://git.home.timatlee.com/timatlee/cloudflare-ddns-docker-updated/pulls/2
2024-06-11 18:40:43 -06:00
a781f2cd80 Merge pull request 'Update dependency idna to v3 [SECURITY]' (#1) from renovate/pypi-idna-vulnerability into main
Reviewed-on: https://git.home.timatlee.com/timatlee/cloudflare-ddns-docker-updated/pulls/1
2024-06-11 18:39:48 -06:00
3e4d6156c7 Merge branch 'main' of git.home.timatlee.com:timatlee/cloudflare-ddns-docker-updated 2024-06-11 18:39:20 -06:00
ef4b86c132 Merge remote-tracking branch 'origin/renovate/chardet-5.x' 2024-06-11 18:39:14 -06:00
ce76fa87ed Merge pull request 'Update dependency flake8-bugbear to v24' (#15) from renovate/flake8-bugbear-24.x into main
Reviewed-on: https://git.home.timatlee.com/timatlee/cloudflare-ddns-docker-updated/pulls/15
2024-06-11 18:37:21 -06:00
55d0ec44c0 Merge pull request 'Update dependency urllib3 to v2' (#16) from renovate/urllib3-2.x into main
Reviewed-on: https://git.home.timatlee.com/timatlee/cloudflare-ddns-docker-updated/pulls/16
2024-06-11 18:31:40 -06:00
f154083f07 Add dotenv support 2024-06-11 18:26:12 -06:00
199763f50e Test action! 2024-06-11 11:04:30 -06:00
6905b2adab Update renovate.json 2024-06-11 08:54:42 -06:00
304ba2a48a Update renovate.json
Ignore .github directory, since we're not using it ..  and this is a fork from a mirror.
2024-06-11 08:43:46 -06:00
5201dfa2d4 Update dependency urllib3 to v2 2024-06-11 14:41:25 +00:00
ae038ca034 Update dependency flake8-bugbear to v24 2024-06-11 14:41:24 +00:00
4f7f3f243c Update dependency chardet to v5 2024-06-11 14:41:20 +00:00
4b169c2051 Update dependency pep8-naming to ~=0.14.1 2024-06-11 14:41:13 +00:00
9b24129760 Update dependency flake8-tidy-imports to ~=4.10.0 2024-06-11 14:41:10 +00:00
bb916ed3c1 Update dependency flake8 to ~=3.9.2 2024-06-11 14:41:00 +00:00
35da9d30b2 Update dependency click to v8.1.7 2024-06-11 14:40:59 +00:00
753b3523c6 Update dependency idna to v3 [SECURITY] 2024-06-11 14:40:57 +00:00
0743d7fa6d Update renovate.json 2024-06-11 08:40:20 -06:00
6ac289ccf1 Update requirements.txt 2024-06-11 08:32:16 -06:00
fa8d5c1c61 Add renovate.json 2024-06-10 20:05:20 -06:00
bbc042a642 Updated to current python ver. Learning how to make a container. 2024-06-04 12:12:17 -06:00
9 changed files with 85 additions and 22 deletions

View 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
View File

@ -0,0 +1 @@
[]

View File

@ -1,4 +1,4 @@
FROM python:3.9-slim
FROM python:3.12-slim
WORKDIR /app

View File

@ -5,44 +5,72 @@
[![License](https://img.shields.io/badge/license-MIT-green)](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!

View File

@ -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(

View File

@ -1,5 +1,4 @@
## Development docker-compose
version: "3.7"
services:
cloudflare-ddns:
build:

9
renovate.json Normal file
View File

@ -0,0 +1,9 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"forkProcessing": "enabled",
"ignorePaths": [
".github"
]
}

View File

@ -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.4.26
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.10.0
flake8-todo~=0.7
pep8-naming~=0.11.1
pep8-naming~=0.14.1

View File

@ -1,2 +1,8 @@
requests~=2.25.1
click8~=8.0.1
certifi==2024.6.2
chardet==5.2.0
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
idna==3.7
requests==2.32.3
urllib3==2.2.2