Refactor
Some checks failed
Test and build / Test and lint (push) Successful in 1m12s
Test and build / Build collector (push) Failing after 1m15s
Test and build / Build receiver (push) Failing after 1m29s

This commit is contained in:
2026-02-23 21:21:23 +01:00
parent 227477d17f
commit f234497162
4 changed files with 32 additions and 14 deletions

View File

@@ -1,6 +1,10 @@
FROM alpine:3
COPY ./etc /etc/hamview
COPY ./build/hamview-collector /opt/hamview/bin/hamview-collector
WORKDIR /opt/hamview
ENTRYPOINT ["bin/hamview-collector"]
CMD [ "--config", "/etc/hamview/hamview-collector.yaml" ]
RUN apk add --no-cache dumb-init=1.2.5-r3
WORKDIR /app
COPY ./etc /app/config
COPY ./build/hamview-collector /app/hamview-collector
COPY ./cmd/hamview-collector/entrypoint.sh /entrypoint.sh
ENTRYPOINT ["dumb-init", "/entrypoint.sh"]

View File

@@ -0,0 +1,10 @@
#!/bin/sh
case "$@" in
"")
exec "/app/hamview-receiver" --config "/app/config/hamview-collector.yaml" ;;
;;
*)
exec "/bin/sh" -c "$@"
;;
esac

View File

@@ -7,6 +7,6 @@ ARG TARGETARCH
ARG TARGETVARIANT
COPY ./etc /app/config
COPY ./build/hamview-receiver-${TARGETARCH}${TARGETVARIANT#v} /app/hamview-receiver
COPY ./entrypoint.sh /entrypoint.sh
COPY ./cmd/hamview-receiver/entrypoint.sh /entrypoint.sh
ENTRYPOINT ["dumb-init", "/entrypoint.sh"]