Files
arena-tracker/crates/relay/Dockerfile
T
nessarandClaude Opus 5.5 c7d0395502
CI / relay (pull_request) Successful in 36s
CI / core (pull_request) Successful in 52s
CI / relay (push) Successful in 27s
CI / core (push) Successful in 2m5s
Package the relay as a container image, published by a local script (#151)
A static musl binary on an empty image, run as nobody, listening on 8080.
scripts/publish-relay builds it from a clean, pushed commit of develop or
main and pushes it to Gitea's registry, tagged with the commit and latest.
The build context is an allowlist: never .env nor target/.

RELAY_TRUSTED_PROXY also takes a network: Nginx Proxy Manager's address on
the Docker network changes when it restarts.

docs/service-relais.md gives the compose service, the env file, the NPM
proxy host (no access log, Access List until #152), and how to update,
change the key and check the restart and the per-address limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 17:42:56 +01:00

19 lines
632 B
Docker

# The relay's image (docs/service-relais.md). Build from the repository root:
# docker build -f crates/relay/Dockerfile .
# A static musl binary on an empty image: ureq carries its own root certificates.
FROM rust:1.98-alpine AS build
RUN apk add --no-cache musl-dev
WORKDIR /src
COPY . .
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/src/target \
cargo build --release --locked -p arena-tracker-relay \
&& cp target/release/arena-tracker-relay /relay
FROM scratch
COPY --from=build /relay /relay
ENV RELAY_LISTEN=0.0.0.0:8080
EXPOSE 8080
USER 65534:65534
ENTRYPOINT ["/relay"]