server heathcheck
continuous-integration/drone Build is failing

This commit is contained in:
yves committed 2026-11-21 12:27:13 +01:00
1 parent 923f4e397e
commit 6ea7512af8
7 files changed
+212 -14

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
# Meow v2 relay server (meowsrv): static musl binary in a scratch image (no shell, no libc).
# docker build -t meowsrv:v2 .
FROM rust:1-alpine AS builder
RUN apk add --no-cache musl-dev
WORKDIR /src
COPY . .
RUN cargo build --release --locked -p meow-server --bin meowsrv \
&& mkdir -p /out/data \
&& cp target/release/meowsrv /out/meowsrv
FROM scratch
COPY --from=builder /out/meowsrv /usr/bin/meowsrv
# Owned by the unprivileged user: a named volume mounted on /data inherits it.
COPY --from=builder --chown=10001:10001 /out/data /data
USER 10001:10001
ENV MEOWSRV_LISTEN=0.0.0.0:8080 \
MEOWSRV_KEY_FILE=/data/server.key \
MEOWSRV_STORAGE=memory \
MEOWSRV_LOG=info
VOLUME ["/data"]
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD ["/usr/bin/meowsrv", "healthcheck"]
ENTRYPOINT ["/usr/bin/meowsrv"]