32 lines
656 B
Docker
32 lines
656 B
Docker
FROM rust:1.99-trixie as builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY Cargo.toml Cargo.lock ./
|
|
COPY crates/ crates/
|
|
|
|
RUN cargo build --release --package steep-server
|
|
|
|
|
|
FROM debian:trixie-slim
|
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
git \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
WORKDIR /app
|
|
COPY --from=builder /app/target/release/steep-server ./steep-server
|
|
|
|
COPY front ./front
|
|
|
|
COPY crates/steep-server/toasty ./toasty
|
|
ENV MIGRATIONS_DIR=/app/toasty
|
|
|
|
COPY scripts/migrate-apply.sh ./scripts/migrate-apply.sh
|
|
RUN chmod +x ./scripts/migrate-apply.sh
|
|
|
|
CMD ["sh", "-c", "./scripts/migrate-apply.sh && exec ./steep-server"]
|