Docker: Add DynDNS client for DigitalOcean
This commit is contained in:
parent
250235e6e9
commit
7c5348c52e
5 changed files with 84 additions and 1 deletions
3
Makefile
3
Makefile
|
@ -223,6 +223,9 @@ docker-local:
|
||||||
scripts/docker/build.sh photoprism
|
scripts/docker/build.sh photoprism
|
||||||
docker-pull:
|
docker-pull:
|
||||||
docker pull photoprism/photoprism:preview photoprism/photoprism:latest
|
docker pull photoprism/photoprism:preview photoprism/photoprism:latest
|
||||||
|
docker-ddns:
|
||||||
|
docker pull golang:alpine
|
||||||
|
scripts/docker/multiarch.sh ddns linux/amd64,linux/arm64 $(DOCKER_TAG)
|
||||||
docker-goproxy:
|
docker-goproxy:
|
||||||
docker pull golang:alpine
|
docker pull golang:alpine
|
||||||
scripts/docker/multiarch.sh goproxy linux/amd64,linux/arm64 $(DOCKER_TAG)
|
scripts/docker/multiarch.sh goproxy linux/amd64,linux/arm64 $(DOCKER_TAG)
|
||||||
|
|
|
@ -17,7 +17,6 @@ services:
|
||||||
- "~/.cache/npm:/root/.cache/npm"
|
- "~/.cache/npm:/root/.cache/npm"
|
||||||
- "~/.cache/go-mod:/go/pkg/mod"
|
- "~/.cache/go-mod:/go/pkg/mod"
|
||||||
environment:
|
environment:
|
||||||
GOPROXY: ${GOPROXY:-http://goproxy:8888,direct}
|
|
||||||
PHOTOPRISM_SITE_URL: "http://localhost:2342/"
|
PHOTOPRISM_SITE_URL: "http://localhost:2342/"
|
||||||
PHOTOPRISM_SITE_TITLE: "PhotoPrism"
|
PHOTOPRISM_SITE_TITLE: "PhotoPrism"
|
||||||
PHOTOPRISM_SITE_CAPTION: "Browse Your Life"
|
PHOTOPRISM_SITE_CAPTION: "Browse Your Life"
|
||||||
|
|
8
docker/ddns/Dockerfile
Normal file
8
docker/ddns/Dockerfile
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
FROM golang:alpine
|
||||||
|
|
||||||
|
# Q: What is this?
|
||||||
|
# A: DDNS is a personal DynDNS client for DigitalOcean, see https://github.com/skibish/ddns.
|
||||||
|
|
||||||
|
RUN go install github.com/skibish/ddns@latest
|
||||||
|
|
||||||
|
CMD ["ddns", "-conf-file", "/config/ddns.yml"]
|
64
docker/ddns/config/ddns.yml
Normal file
64
docker/ddns/config/ddns.yml
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
# DigitalOcean DynDNS Config
|
||||||
|
|
||||||
|
# Mandatory, DigitalOcean API token.
|
||||||
|
# It can be also set using environment variable DDNS_TOKEN.
|
||||||
|
token: ""
|
||||||
|
|
||||||
|
# By default, IP check occurs every 5 minutes.
|
||||||
|
# It can be also set using environment variable DDNS_CHECKPERIOD.
|
||||||
|
checkPeriod: "5m"
|
||||||
|
|
||||||
|
# By default, timeout to external resources is set to 10 seconds.
|
||||||
|
# It can be also set using environment variable DDNS_REQUESTTIMEOUT.
|
||||||
|
requestTimeout: "10s"
|
||||||
|
|
||||||
|
# By default, IPv6 address is not requested.
|
||||||
|
# IPv6 address can be forced by setting it to `true`.
|
||||||
|
# It can be also set using environment variable DDNS_IPV6.
|
||||||
|
ipv6: false
|
||||||
|
|
||||||
|
# List of domains and their records to update.
|
||||||
|
domains:
|
||||||
|
example.com:
|
||||||
|
# More details about the fields can be found here:
|
||||||
|
# https://developers.digitalocean.com/documentation/v2/#create-a-new-domain-record
|
||||||
|
- type: "A"
|
||||||
|
name: "www"
|
||||||
|
- type: "TXT"
|
||||||
|
name: "demo"
|
||||||
|
|
||||||
|
# By default, is set to "{{.IP}}" (key .IP is reserved).
|
||||||
|
# Supports Go template engine.
|
||||||
|
# Additional keys can be set in "params" block below.
|
||||||
|
data: "My IP is {{.IP}} and I am {{.mood}}"
|
||||||
|
|
||||||
|
# By default, 1800 seconds (5 minutes).
|
||||||
|
ttl: 1800
|
||||||
|
|
||||||
|
# By default, params is empty.
|
||||||
|
params:
|
||||||
|
mood: "cool"
|
||||||
|
|
||||||
|
# By default, notifications is empty.
|
||||||
|
notifications:
|
||||||
|
|
||||||
|
# Gotify (https://gotify.net)
|
||||||
|
- type: "gotify"
|
||||||
|
app_url: "https://gotify.example.com"
|
||||||
|
app_token: ""
|
||||||
|
title: "DDNS"
|
||||||
|
|
||||||
|
# SMTP
|
||||||
|
- type: "smtp"
|
||||||
|
user: "foo@bar.com"
|
||||||
|
password: "1234"
|
||||||
|
host: "localhost"
|
||||||
|
port: "468"
|
||||||
|
from: "bar@foo.com"
|
||||||
|
to: "foo@foo.com"
|
||||||
|
subject: "My DDNS sending me a message"
|
||||||
|
|
||||||
|
# Telegram (https://telegram.org)
|
||||||
|
- type: "telegram"
|
||||||
|
token: "telegram bot token"
|
||||||
|
chat_id: "1234"
|
9
docker/ddns/docker-compose.yml
Normal file
9
docker/ddns/docker-compose.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
version: '3.5'
|
||||||
|
|
||||||
|
# DDNS is a personal DynDNS client for DigitalOcean, see https://github.com/skibish/ddns
|
||||||
|
services:
|
||||||
|
ddns:
|
||||||
|
image: photoprism/ddns:latest
|
||||||
|
user: "1000:1000"
|
||||||
|
volumes:
|
||||||
|
- "./config:/config" # edit "config/ddns.yml" before starting the service
|
Loading…
Reference in a new issue