Add systemd unit, Dockerfile, docker-compose, and fail2ban configs for production deployment

This commit is contained in:
2026-06-11 13:42:08 +00:00
parent 5d1e29fde9
commit 6d497eb5d3
5 changed files with 108 additions and 0 deletions

22
deploy/Dockerfile Normal file
View File

@@ -0,0 +1,22 @@
FROM rust:alpine AS builder
RUN apk add --no-cache musl-dev
WORKDIR /usr/src/reverse-proxy
COPY . .
RUN cargo build --release --target x86_64-unknown-linux-musl
FROM alpine:latest
RUN apk add --no-cache ca-certificates
COPY --from=builder /usr/src/reverse-proxy/target/x86_64-unknown-linux-musl/release/reverse-proxy /usr/local/bin/reverse-proxy
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD wget -q --spider http://127.0.0.1:9900/health || exit 1
EXPOSE 80 443
ENTRYPOINT ["reverse-proxy"]
CMD ["--config", "/etc/reverse-proxy/config.toml"]