File tree Expand file tree Collapse file tree 3 files changed +25
-5
lines changed Expand file tree Collapse file tree 3 files changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ FROM golang:alpine
22
33RUN apk add --no-cache git
44
5+ COPY docker/ddns/entrypoint.sh /entrypoint.sh
56WORKDIR /go/src/github.com/pboehm/ddns
67COPY . .
78
@@ -11,8 +12,4 @@ RUN GO111MODULE=on go install -v ./...
1112ENV GIN_MODE release
1213ENV DDNS_EXPIRATION_DAYS 10
1314
14- CMD /go/bin/ddns \
15- --domain=${DDNS_DOMAIN} \
16- --soa_fqdn=${DDNS_SOA_DOMAIN} \
17- --redis=${DDNS_REDIS_HOST} \
18- --expiration-days=${DDNS_EXPIRATION_DAYS}
15+ ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ if [[ $# -eq 0 ]]; then
4+
5+ if [[ " ${DEBUG_MODE:- false} " == " true" ]]; then
6+ /go/bin/ddns \
7+ --domain=${DDNS_DOMAIN} \
8+ --soa_fqdn=${DDNS_SOA_DOMAIN} \
9+ --redis=${DDNS_REDIS_HOST} \
10+ --expiration-days=${DDNS_EXPIRATION_DAYS} \
11+ --verbose
12+ else
13+ /go/bin/ddns \
14+ --domain=${DDNS_DOMAIN} \
15+ --soa_fqdn=${DDNS_SOA_DOMAIN} \
16+ --redis=${DDNS_REDIS_HOST} \
17+ --expiration-days=${DDNS_EXPIRATION_DAYS}
18+ fi
19+
20+ else
21+ " $@ "
22+ fi
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ services:
66 DDNS_DOMAIN: d.example.net # <<< ADJUST DOMAIN
77 DDNS_SOA_DOMAIN: ddns.example.net # <<< ADJUST DOMAIN
88 DDNS_EXPIRATION_DAYS: 10
9+ DEBUG_MODE: "false"
910
1011 powerdns:
1112 ports:
You can’t perform that action at this time.
0 commit comments