Skip to content

Commit

Permalink
dont ship full rust dev environment when a couple of binaries are eno…
Browse files Browse the repository at this point in the history
…ugh (#17)
  • Loading branch information
ms1331 authored Nov 12, 2024
1 parent 438817f commit e1cc460
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
FROM rust:latest
FROM rust:alpine AS build

RUN cargo install monolith
RUN apk add musl-dev perl make
RUN cargo install textpod
RUN cargo install monolith

FROM alpine
COPY --from=build /usr/local/cargo/bin/textpod /usr/bin/textpod
COPY --from=build /usr/local/cargo/bin/monolith /usr/bin/monolith

WORKDIR /app/notes

HEALTHCHECK --interval=60s --retries=3 --timeout=1s \
CMD curl -f http://localhost:3000/ || exit 1
CMD nc -z -w 1 localhost 3000 || exit 1

ENTRYPOINT ["textpod"]
CMD ["-p", "3000", "-l", "0.0.0.0"]
CMD ["-p", "3000", "-l", "0.0.0.0"]

0 comments on commit e1cc460

Please sign in to comment.