chessbaseLinux/website/Dockerfile
vrubelroman 75692ede4d
Some checks are pending
CI / check (push) Waiting to run
CI / windows-build (push) Waiting to run
CI / macos-build (push) Waiting to run
Site: the big clouds are machines, not people
A Windows installation 'in Cheyenne' right after a release is Microsoft's scanner running
the new program in Azure. The DB-IP Lite ASN database (fetched like the city one) tells
the networks of Microsoft, Amazon, Google, Oracle, Alibaba, Tencent and IBM apart: their
launches are not counted or announced, their downloads and visits count as crawlers.
Small hostings are left alone: people's VPNs run on them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 14:58:38 +03:00

25 lines
1.1 KiB
Docker

# ChessPenguin website: one small Rust server for the pages, the downloads and /stats.
FROM rust:1-slim-bookworm AS build
WORKDIR /src
COPY server/Cargo.toml server/Cargo.lock ./
COPY server/src ./src
RUN cargo build --release --locked
FROM debian:bookworm-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates curl tzdata \
&& rm -rf /var/lib/apt/lists/* \
&& useradd --system --uid 10001 --home-dir /app site
WORKDIR /app
COPY --from=build /src/target/release/chesspenguin-site /usr/local/bin/
COPY site ./site
COPY static ./static
COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN mkdir -p /app/data
# Starts as root only to take ownership of the mounted data/, then runs as "site".
ENV PORT=8080 STATIC_DIR=/app/static SITE_DIR=/app/site DB_PATH=/app/data/downloads.sqlite \
GEOIP_DB=/app/data/dbip-city-ipv4.mmdb,/app/data/dbip-city-ipv6.mmdb \
ASN_DB=/app/data/dbip-asn.mmdb
EXPOSE 8080
HEALTHCHECK --interval=60s --timeout=5s --start-period=10m CMD curl -fsS http://127.0.0.1:8080/healthz || exit 1
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]