feat: environment configuration

Environment variables can now be used to configure any
config property including the feeds list.

This makes it easier to use in environments without access
to config files like GCR. Some may prefer not to have a separate
config file as well.

Also added build metadata to the docker image and binaries.
This commit is contained in:
Evan Buss
2024-08-11 18:47:46 +00:00
parent d8d35b6cef
commit 9da7ea1bbc
10 changed files with 239 additions and 39 deletions

View File

@@ -23,7 +23,11 @@ RUN go mod verify
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o opds-proxy
ARG VERSION=dev
ARG REVISION=unknown
ARG BUILDTIME=unknown
RUN CGO_ENABLED=0 go build -ldflags "-s -w -X main.version=${VERSION} -X main.commit=${REVISION} -X main.date=${BUILDTIME}" -o opds-proxy
FROM gcr.io/distroless/static