build(build): modified run.bash for compatibility with docker-compose
All checks were successful
/ desec-script (push) Successful in 1m33s
All checks were successful
/ desec-script (push) Successful in 1m33s
This commit is contained in:
parent
295ebe86a6
commit
6a3428a49c
4 changed files with 13 additions and 5 deletions
|
|
@ -4,7 +4,6 @@ COPY . /desec
|
||||||
|
|
||||||
WORKDIR /desec/server-scripts/desec-ip-sync/
|
WORKDIR /desec/server-scripts/desec-ip-sync/
|
||||||
|
|
||||||
|
|
||||||
RUN apt update && apt install python3.11-venv -y
|
RUN apt update && apt install python3.11-venv -y
|
||||||
|
|
||||||
CMD ["bash", "run.bash"]
|
CMD ["bash", "run.bash"]
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
services:
|
services:
|
||||||
desec-script:
|
desec:
|
||||||
image: git.devdoes.work/devaine/desec-script:latest
|
container_name: desec
|
||||||
container_name: desec-script
|
image: git.devdoes.work/devaine/scripts:desec
|
||||||
|
platform: "linux/arm64"
|
||||||
|
environment:
|
||||||
|
- DESEC_TOKEN=${DESEC_TOKEN}
|
||||||
|
- CURRENT_DOMAIN=${CURRENT_DOMAIN}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ load_dotenv()
|
||||||
DOMAIN = os.getenv("CURRENT_DOMAIN")
|
DOMAIN = os.getenv("CURRENT_DOMAIN")
|
||||||
DESEC_TOKEN = os.getenv("DESEC_TOKEN")
|
DESEC_TOKEN = os.getenv("DESEC_TOKEN")
|
||||||
IGNORED_SUBDOMAINS_PREFIXES = ["mail._domainkey.mail", "mail", "_dmarc.mail", "skyguy"]
|
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:
|
# Credits:
|
||||||
# https://desec.readthedocs.io/en/latest/dns/rrsets.html#modifying-an-rrset
|
# https://desec.readthedocs.io/en/latest/dns/rrsets.html#modifying-an-rrset
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ ! -f .env ]; then
|
||||||
|
env | grep DESEC_TOKEN >>.env
|
||||||
|
env | grep CURRENT_DOMAIN >>.env
|
||||||
|
fi
|
||||||
|
|
||||||
# If virtual environment does exist..
|
# If virtual environment does exist..
|
||||||
if [ ! -d venv ]; then
|
if [ ! -d venv ]; then
|
||||||
python3 -m venv venv
|
python3 -m venv venv
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue