# Runtime only — binary built externally via cargo
FROM ubuntu:24.04

RUN apt-get update && apt-get install -y --no-install-recommends \
    ca-certificates git \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY target/x86_64-unknown-linux-gnu/release/static-server /app/static-server

ENV RUST_LOG=info
ENV STATIC_LOG_LEVEL=info
ENV STATIC_BIND=0.0.0.0:8081
ENV STATIC_ROOT=/data
ENV STATIC_CORS=true

EXPOSE 8081
ENTRYPOINT ["/app/static-server"]
