From 74988dfce4d656117462e050cf079ed7b5c1de95 Mon Sep 17 00:00:00 2001 From: Hugo-C Date: Sun, 15 Oct 2023 01:31:47 +0200 Subject: [PATCH] GH-41 # Fix Rocket.toml not included in final image --- Cargo.lock | 2 +- Dockerfile | 7 ++++--- Rocket.toml | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8a9e702..6831cc8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -728,7 +728,7 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jarm_online" -version = "0.2.1" +version = "0.2.2" dependencies = [ "csv", "lazy_static", diff --git a/Dockerfile b/Dockerfile index 05d5195..6105f5b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ -FROM rust:1.73 as build-stage +FROM rust:1.73-bullseye as build-stage ARG BUILD_TARGET="x86_64-unknown-linux-musl" -ARG BUILD_OPTIONS="--release --target $BUILD_TARGET" +ARG BUILD_OPTIONS="--release --target $BUILD_TARGET" RUN apt update && apt install -y build-essential musl-tools -RUN rustup default nightly && rustup target add $BUILD_TARGET +RUN rustup set profile minimal && rustup default nightly && rustup target add $BUILD_TARGET WORKDIR /app @@ -29,6 +29,7 @@ RUN touch /app/project/src/main.rs && cargo build $BUILD_OPTIONS -Z unstable-opt FROM alpine:3 as production-stage RUN mkdir /app COPY --from=build-stage /app/dist/jarm_online /app +COPY --from=build-stage /app/project/Rocket.toml / RUN chown -R 1001:1001 /app USER 1001 CMD /app/jarm_online \ No newline at end of file diff --git a/Rocket.toml b/Rocket.toml index 19faa7f..615ebfb 100644 --- a/Rocket.toml +++ b/Rocket.toml @@ -6,7 +6,7 @@ log_level = "normal" limits = { forms = 32768 } [release] -address = "127.0.0.1" +address = "0.0.0.0" port = 8000 log_level = "normal" limits = { forms = 32768 } \ No newline at end of file