env and docker fixes

This commit is contained in:
2025-11-04 12:54:22 +01:00
parent 67302965d8
commit 359f7a4ad8
16 changed files with 156 additions and 34 deletions

16
Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
FROM rust:latest AS builder
WORKDIR /app
COPY . .
RUN cargo build --release
FROM debian:bookworm-slim
WORKDIR /app
COPY --from=builder /app/target/release/hotel-api-rs /usr/local/bin/hotel-api-rs
# Create the directory where DB will be stored
RUN mkdir -p /db
# Expose API port
EXPOSE 8080
CMD ["/usr/local/bin/hotel-api-rs"]