[#26] Moved main binary to separate location

This commit is contained in:
Jef Roosens 2021-04-15 19:26:37 +02:00
parent 37c9b397b4
commit cb78af62ba
Signed by: Jef Roosens
GPG key ID: B580B976584B5F30
4 changed files with 8 additions and 8 deletions

View file

@ -3,4 +3,4 @@ FROM chewingbever/fej-builder:latest
ENV RUST_BACKTRACE 1
ENTRYPOINT ["cargo"]
CMD ["run"]
CMD ["run", "--bin", "server"]

View file

@ -7,7 +7,7 @@ FROM chewingbever/fej-builder:latest AS builder
# NOTE: cargo install auto-appends bin to the path
RUN --mount=type=cache,target=/usr/src/app/target \
--mount=type=cache,target=/root/.cargo/registry \
cargo install --path . --bin fej --root /usr/local
cargo install --path . --root /usr/local
# Now, we create the actual image
@ -17,7 +17,7 @@ FROM alpine:latest
RUN apk update && apk add --no-cache openssl libgcc curl
# Copy binary over to final image
COPY --from=builder /usr/local/bin/fej /usr/local/bin/fej
COPY --from=builder /usr/local/bin/server /usr/local/bin/server
HEALTHCHECK \
--interval=10s \
@ -26,4 +26,4 @@ HEALTHCHECK \
--retries=3 \
CMD curl -q localhost:8000
CMD ["/usr/local/bin/fej"]
CMD ["/usr/local/bin/server"]