Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker examples #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,38 @@ docker pull ghcr.io/akarys42/cloudflare-ddns-docker

There are no special requirements when building this container! Simply use `docker build` in this folder.

#### For docker command
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#### For docker command
### Running on Docker


You can use:
```
docker run --name ddns_client --rm \
-d ghcr.io/akarys42/cloudflare-ddns-docker \
-k ${token} \
mydomain.cat *.mydomain.cat mail.mydomain.cat
```
or
```
docker run --name ddns_client --rm \
-e CF_DDNS_DOMAINS="mydomain.cat *.mydomain.cat mail.mydomain.cat" \
-e CF_DDNS_TOKEN="${token}" \
-d ghcr.io/akarys42/cloudflare-ddns-docker
```
(replacing ${token} by your Cloudflare DNS Edit Permission Token)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd use $TOKEN instead as it is the syntax for a shell variable


#### For docker-compose users
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#### For docker-compose users
### Running on Docker-compose


```
version: "3.7"
services:
cloudflare-ddns:
image: ghcr.io/akarys42/cloudflare-ddns-docker
container_name: ddns_client
enviroment:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: enviroment should be environment

CF_DDNS_DOMAINS: "mydomain.cat *.mydomain.cat mail.mydomain.cat"
CF_DDNS_TOKEN: "${token}"
```
(replacing ${token} again)

### Running on the Host

In order to run this project on the host, you'll need Python > 3.8, and an environment containing
Expand Down
8 changes: 8 additions & 0 deletions dev-docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Development docker-compose
version: "3.7"
services:
cloudflare-ddns:
build:
context: .
dockerfile: Dockerfile
container_name: cloudflare-ddns
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: "3.7"
services:
cloudflare-ddns:
image: ghcr.io/akarys42/cloudflare-ddns-docker
container_name: ddns_client
enviroment:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should instead be loading a .env file?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested using env_file: .env instead of environment: and works as intended. Just add a .env file to the same directory.

ref: env_file | Compose specification | Docker Documentation

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: enviroment should be environment

CF_DDNS_DOMAINS: "mydomain.cat *.mydomain.cat mail.mydomain.cat"
CF_DDNS_TOKEN: "${token}"