Adopt new hierarchy pattern
This commit is contained in:
6
services/.gitignore
vendored
Normal file
6
services/.gitignore
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
*/volumes/*/*
|
||||
!*/volumes/*/README.md
|
||||
!*/volumes/*/.gitkeep
|
||||
*/secrets/*
|
||||
!*/secrets/README.md
|
||||
!.gitignore
|
||||
19
services/ddclient/configs/ddclient.conf.tpl
Normal file
19
services/ddclient/configs/ddclient.conf.tpl
Normal file
@@ -0,0 +1,19 @@
|
||||
daemon=300 # check every 300 seconds
|
||||
syslog=yes # log update msgs to syslog
|
||||
pid=/var/run/ddclient/ddclient.pid # record PID in file.
|
||||
ssl=yes # use ssl-support. Works with
|
||||
# ssl-library
|
||||
postscript=/data/postscript_gotify.sh # run script after updating. The
|
||||
# new IP is added as argument.
|
||||
use=web
|
||||
web=googledomains
|
||||
|
||||
##
|
||||
## CloudFlare (www.cloudflare.com)
|
||||
##
|
||||
protocol=cloudflare, \
|
||||
zone=dedicated.contact, \
|
||||
ttl=1, \
|
||||
login=token, \
|
||||
password=$CLOUDFLARE_TOKEN \
|
||||
$CLOUDFLARE_DOMAIN
|
||||
5
services/ddclient/secrets/README.md
Normal file
5
services/ddclient/secrets/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
Contains the file `gotify_token`
|
||||
Loadded in the postscript_gotify.sh to send a notification when a new IP is found
|
||||
|
||||
Contains the file `clourflare_token`
|
||||
Token required to access the DNS API of cloudflare
|
||||
1
services/ddclient/volumes/data/.gitignore
vendored
Normal file
1
services/ddclient/volumes/data/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!postscript_gotify.sh
|
||||
12
services/ddclient/volumes/data/postscript_gotify.sh
Executable file
12
services/ddclient/volumes/data/postscript_gotify.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$(cat /data/gotify_previous_ip || true)" != "$1" ]; then
|
||||
echo -n "$1" > /data/gotify_previous_ip
|
||||
|
||||
curl -s "${GOTIFY_ADDRESS%/}/message" \
|
||||
-X POST \
|
||||
-H "X-Gotify-Key: $GOTIFY_TOKEN" \
|
||||
-F "title=IP Address updated" \
|
||||
-F "message=IP address detected as $1" \
|
||||
-F "priority=5"
|
||||
fi
|
||||
1
services/ddclient/volumes/init/.gitignore
vendored
Normal file
1
services/ddclient/volumes/init/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!entrypoint.sh
|
||||
29
services/ddclient/volumes/init/entrypoint.sh
Executable file
29
services/ddclient/volumes/init/entrypoint.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
# usage: file_env VAR [DEFAULT]
|
||||
# ie: file_env 'XYZ_DB_PASSWORD' 'example'
|
||||
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
||||
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
||||
file_env() {
|
||||
local var="$1"
|
||||
local fileVar="${var}_FILE"
|
||||
local def="${2:-}"
|
||||
if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then
|
||||
mysql_error "Both $var and $fileVar are set (but are exclusive)"
|
||||
fi
|
||||
local val="$def"
|
||||
if [ "${!var:-}" ]; then
|
||||
val="${!var}"
|
||||
elif [ "${!fileVar:-}" ]; then
|
||||
val="$(< "${!fileVar}")"
|
||||
fi
|
||||
export "$var"="$val"
|
||||
unset "$fileVar"
|
||||
}
|
||||
|
||||
apk add --update gettext
|
||||
|
||||
file_env 'GOTIFY_TOKEN'
|
||||
file_env 'CLOUDFLARE_TOKEN'
|
||||
|
||||
envsubst < /config/ddclient.conf.tpl > /ddclient.conf
|
||||
4
services/gotify/secrets/README.md
Normal file
4
services/gotify/secrets/README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
Contains the file `admin_password`
|
||||
|
||||
Envirnonment variable file for the default admin password, this is because gotify doesn't support docker secrets yet
|
||||
https://github.com/gotify/server/issues/392
|
||||
1
services/gotify/volumes/data/.gitignore
vendored
Normal file
1
services/gotify/volumes/data/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!entrypoint.sh
|
||||
28
services/gotify/volumes/data/entrypoint.sh
Executable file
28
services/gotify/volumes/data/entrypoint.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
# usage: file_env VAR [DEFAULT]
|
||||
# ie: file_env 'XYZ_DB_PASSWORD' 'example'
|
||||
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
|
||||
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
|
||||
file_env() {
|
||||
local var="$1"
|
||||
local fileVar="${var}_FILE"
|
||||
local def="${2:-}"
|
||||
if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then
|
||||
mysql_error "Both $var and $fileVar are set (but are exclusive)"
|
||||
fi
|
||||
local val="$def"
|
||||
if [ "${!var:-}" ]; then
|
||||
val="${!var}"
|
||||
elif [ "${!fileVar:-}" ]; then
|
||||
val="$(< "${!fileVar}")"
|
||||
fi
|
||||
export "$var"="$val"
|
||||
unset "$fileVar"
|
||||
}
|
||||
|
||||
cd /app
|
||||
|
||||
file_env 'GOTIFY_DEFAULTUSER_PASS'
|
||||
|
||||
./gotify-app "$@"
|
||||
2
services/portainer/secrets/README.md
Normal file
2
services/portainer/secrets/README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
Contains the file `portainer_password`
|
||||
More on https://docs.portainer.io/advanced/cli#method-2-creating-the-account-using-a-file
|
||||
0
services/portainer/volumes/data/.gitkeep
Normal file
0
services/portainer/volumes/data/.gitkeep
Normal file
0
services/smokeping/volumes/data/.gitkeep
Normal file
0
services/smokeping/volumes/data/.gitkeep
Normal file
29
services/traefik/configs/traefik.yml
Normal file
29
services/traefik/configs/traefik.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
providers:
|
||||
docker:
|
||||
endpoint: tcp://docker:2375
|
||||
exposedByDefault: false
|
||||
network: traefik
|
||||
|
||||
serverstransport:
|
||||
insecureskipverify: true
|
||||
|
||||
api:
|
||||
insecure: true
|
||||
|
||||
accessLog: {}
|
||||
|
||||
entryPoints:
|
||||
web:
|
||||
address: :80
|
||||
http:
|
||||
# redirections:
|
||||
# entryPoint:
|
||||
# to: websecure
|
||||
# scheme: https
|
||||
websecure:
|
||||
address: :443
|
||||
http:
|
||||
tls: {}
|
||||
|
||||
global:
|
||||
sendAnonymousUsage: false
|
||||
2
services/watchtower/secrets/README.md
Normal file
2
services/watchtower/secrets/README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
Contains the file `gotify_token`
|
||||
More on https://crazymax.dev/diun/notif/gotify/
|
||||
Reference in New Issue
Block a user