FIX: re implement docker file
Some checks failed
Deploy API / build-and-deploy (push) Failing after 2m39s

This commit is contained in:
2026-03-11 14:30:12 +01:00
parent e5a1d36654
commit 96dae54411
5 changed files with 38 additions and 15 deletions

23
Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
FROM rust:latest AS builder
WORKDIR /app
COPY . .
RUN cargo build --release
FROM debian:bookworm-slim
# Create the app user with UID 1001
RUN useradd -u 1001 -m appuser
# Create working directory (only needed if your app expects /app)
WORKDIR /app
# Copy binary from builder
COPY --from=builder /app/target/release/hotel-api-rs /usr/local/bin/hotel-api-rs
# Switch to non-root user
USER 1001
# Expose API port
EXPOSE 8080
CMD ["/usr/local/bin/hotel-api-rs"]