From 79bf10217325dcad4a974aa2c34207f64863f96d Mon Sep 17 00:00:00 2001 From: Malfurious Date: Fri, 27 Oct 2023 21:25:42 -0400 Subject: dmt: Add service container DMT (Display for Monitoring log Text) will be the HTTP monitoring interface for cychedelic. We mount the system data as readonly for this purpose. The Dockerfile is largely based on that of ACID for the moment, as I anticipate the same underlying packages. Also, the web service entry is written to be intended for use with the nginx-proxy reverse proxy. CGD is an extremely simple daemon used for serving a CGI script over HTTP. It is available as Public Domain / MIT code. DMT's entrypoint will be implemented as a CGI shell script. Signed-off-by: Malfurious --- dmt/Dockerfile | 19 +++++++++++++++++++ docker-compose.yml | 16 ++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 dmt/Dockerfile diff --git a/dmt/Dockerfile b/dmt/Dockerfile new file mode 100644 index 0000000..6d53838 --- /dev/null +++ b/dmt/Dockerfile @@ -0,0 +1,19 @@ +FROM alpine + +RUN apk --no-cache upgrade +RUN apk --no-cache add \ + bash \ + docker-cli \ + docker-compose \ + git \ + go + +WORKDIR /app +ENV PATH="${PATH}:/app" +ENV GOPATH="/usr/local" +COPY . . + +RUN go install github.com/uriel/cgd@latest + +EXPOSE 80 +CMD ["cgd", "-a", ":80", "-c", "dmt"] diff --git a/docker-compose.yml b/docker-compose.yml index ea05646..f51b868 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,22 @@ services: - "data:/data" - "/var/run/docker.sock:/var/run/docker.sock:ro" + dmt: + build: "dmt" + restart: "always" + volumes: + - "data:/data:ro" + - "/var/run/docker.sock:/var/run/docker.sock:ro" + networks: + - "nginx-proxy-network" + environment: + VIRTUAL_HOST: "YOUR-DOMAIN.example" + LETSENCRYPT_HOST: "YOUR-DOMAIN.example" + volumes: data: name: "cychedelic_data" + +networks: + nginx-proxy-network: + external: true -- cgit v1.2.3