Skip to content

Commit

Permalink
wip: add knot-exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
peterthomassen committed Jan 4, 2024
1 parent e53bb40 commit 8de9b2b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
ln -s ../desec-ns/dnsdist
ln -s ../desec-ns/dox-certs
ln -s ../desec-ns/ns
ln -s ../desec-ns/ns-exporter
ln -s ../desec-ns/openvpn-client
ln -s ../desec-ns/replicator
ln -s ../desec-ns/dnsperf
Expand Down
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@ services:
tag: "desec-ns/ns"
restart: unless-stopped

ns-exporter:
build: ns-exporter
image: ${DOCKER_REGISTRY}desec/desec-ns-exporter:latest
init: true
volumes:
- knotsocket:/run/knot/
logging:
driver: "syslog"
options:
tag: "desec-ns/ns-exporter"
restart: unless-stopped

dnsdist:
build: dnsdist
image: ${DOCKER_REGISTRY}desec/desec-ns-dnsdist:latest
Expand Down
18 changes: 18 additions & 0 deletions ns-exporter/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
ARG DOCKER_REGISTRY
FROM ${DOCKER_REGISTRY}cznic/knot
# TODO fix version

RUN apt-get update \
&& apt-get install -y python3-pip python3-venv \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir /usr/src/app
WORKDIR /usr/src/app

COPY entrypoint.sh .
RUN python3 -m venv venv && ./venv/bin/pip install --no-cache-dir knot-exporter

EXPOSE 9433/TCP

CMD ["/usr/src/app/venv/bin/knot-exporter"]
3 changes: 3 additions & 0 deletions ns-exporter/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
source ./.venv/bin/activate
knot-exporter

0 comments on commit 8de9b2b

Please sign in to comment.