File tree 3 files changed +25
-5
lines changed
3 files changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ FROM golang:alpine
2
2
3
3
RUN apk add --no-cache git
4
4
5
+ COPY docker/ddns/entrypoint.sh /entrypoint.sh
5
6
WORKDIR /go/src/github.com/pboehm/ddns
6
7
COPY . .
7
8
@@ -11,8 +12,4 @@ RUN GO111MODULE=on go install -v ./...
11
12
ENV GIN_MODE release
12
13
ENV DDNS_EXPIRATION_DAYS 10
13
14
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:
6
6
DDNS_DOMAIN: d.example.net # <<< ADJUST DOMAIN
7
7
DDNS_SOA_DOMAIN: ddns.example.net # <<< ADJUST DOMAIN
8
8
DDNS_EXPIRATION_DAYS: 10
9
+ DEBUG_MODE: "false"
9
10
10
11
powerdns:
11
12
ports:
You can’t perform that action at this time.
0 commit comments