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>
19 lines
632 B
Docker
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"]
|