FROM rust:latest AS builder
WORKDIR /usr/src/tg-dev-srv-bot
COPY . .
RUN SQLX_OFFLINE=true cargo install --path .

FROM debian:trixie
RUN apt-get update && apt-get install -y ca-certificates libgmp-dev libmpfr-dev libmpc-dev && rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/cargo/bin/tg-dev-srv-bot /usr/local/bin/tg-dev-srv-bot
CMD ["tg-dev-srv-bot"]
