add deps & create dockerfile

This commit is contained in:
Mitchell Marino 2023-01-11 20:00:02 -06:00
parent 119ea85a66
commit 440a660e05
2 changed files with 13 additions and 0 deletions

View File

@ -6,3 +6,4 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
sqlx = { version = "0.6.2", features = ["postgres"] }

12
Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM rust:latest as build
WORKDIR /usr/src/school_app_api
COPY . .
RUN cargo install --path .
FROM debian:buster-slim
RUN apt-get update && apt-get install -y extra-runtime-dependencies && rm -rf /var/lib/apt/lists/*
COPY --from=builder /user/local/cargo/bin/school_app_api /usr/local/bin/school_app_api
CMD ["school_app_api"]