Skip to content

Commit

Permalink
GH-41 # Fix Rocket.toml not included in final image
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo-C committed Oct 14, 2023
1 parent c01e559 commit 74988df
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
2 changes: 1 addition & 1 deletion Rocket.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

0 comments on commit 74988df

Please sign in to comment.