2021-06-09 14:18:46 +02:00
|
|
|
FROM rust:1.52 as builder
|
|
|
|
WORKDIR /usr/src/moviequotebot_api
|
|
|
|
COPY . .
|
|
|
|
RUN cargo install --path .
|
|
|
|
|
|
|
|
FROM debian:buster-slim
|
2021-06-09 16:34:57 +02:00
|
|
|
RUN apt-get update && apt-get install -y libpq-dev curl && rm -rf /var/lib/apt/lists/*
|
2021-06-09 14:18:46 +02:00
|
|
|
COPY --from=builder /usr/local/cargo/bin/moviequotebot_api /usr/local/bin/moviequotebot_api
|
|
|
|
EXPOSE 8080
|
2021-06-09 17:23:38 +02:00
|
|
|
HEALTHCHECK CMD curl --fail http://localhost:8080/health || exit 1
|
2021-06-09 14:18:46 +02:00
|
|
|
CMD ["moviequotebot_api"]
|