build(build): modified run.bash for compatibility with docker-compose
All checks were successful
/ desec-script (push) Successful in 1m33s

This commit is contained in:
devaine 2026-03-06 00:04:15 -06:00
commit 6a3428a49c
Signed by: devaine
GPG key ID: 954B1DCAC6FF84EE
4 changed files with 13 additions and 5 deletions

View file

@ -4,7 +4,6 @@ COPY . /desec
WORKDIR /desec/server-scripts/desec-ip-sync/
RUN apt update && apt install python3.11-venv -y
CMD ["bash", "run.bash"]

View file

@ -1,4 +1,8 @@
services:
desec-script:
image: git.devdoes.work/devaine/desec-script:latest
container_name: desec-script
desec:
container_name: desec
image: git.devdoes.work/devaine/scripts:desec
platform: "linux/arm64"
environment:
- DESEC_TOKEN=${DESEC_TOKEN}
- CURRENT_DOMAIN=${CURRENT_DOMAIN}

View file

@ -11,7 +11,7 @@ load_dotenv()
DOMAIN = os.getenv("CURRENT_DOMAIN")
DESEC_TOKEN = os.getenv("DESEC_TOKEN")
IGNORED_SUBDOMAINS_PREFIXES = ["mail._domainkey.mail", "mail", "_dmarc.mail", "skyguy"]
TIMEOUT = 10 # In seconds, 600 = 10min, 900 = 15m, 1800 = 30min
TIMEOUT = 1800 # In seconds, 600 = 10min, 900 = 15m, 1800 = 30min
# Credits:
# https://desec.readthedocs.io/en/latest/dns/rrsets.html#modifying-an-rrset

View file

@ -1,5 +1,10 @@
#!/bin/bash
if [ ! -f .env ]; then
env | grep DESEC_TOKEN >>.env
env | grep CURRENT_DOMAIN >>.env
fi
# If virtual environment does exist..
if [ ! -d venv ]; then
python3 -m venv venv