-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
55b02b8
commit f0ed49f
Showing
6 changed files
with
49 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
.git | ||
.github | ||
ci | ||
target | ||
test_suite | ||
target/ | ||
Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# From https://shaneutt.com/blog/rust-fast-small-docker-image-builds/ | ||
|
||
# ------------------------------------------------------------------------------ | ||
# Cargo Build Stage | ||
# ------------------------------------------------------------------------------ | ||
|
||
FROM messense/rust-musl-cross:x86_64-musl as cargo-build | ||
|
||
WORKDIR /usr/src/reacher | ||
|
||
RUN rm -f target/x86_64-unknown-linux-musl/release/deps/reacher* | ||
|
||
COPY . . | ||
|
||
ENV SQLX_OFFLINE=true | ||
|
||
RUN cargo build --bin reacher_backend --release --target=x86_64-unknown-linux-musl | ||
|
||
# ------------------------------------------------------------------------------ | ||
# Final Stage | ||
# ------------------------------------------------------------------------------ | ||
|
||
FROM alpine:latest | ||
|
||
RUN addgroup -g 1000 reacher | ||
|
||
RUN adduser -D -s /bin/sh -u 1000 -G reacher reacher | ||
|
||
WORKDIR /home/reacher/bin/ | ||
|
||
COPY --from=cargo-build /usr/src/reacher/target/x86_64-unknown-linux-musl/release/reacher_backend . | ||
|
||
RUN chown reacher:reacher reacher_backend | ||
|
||
USER reacher | ||
|
||
ENV RUST_LOG=reacher=info | ||
ENV RCH_HTTP_HOST=0.0.0.0 | ||
ENV PORT=8080 | ||
# Bulk verification is disabled by default. Set to 1 to enable it. | ||
ENV RCH_ENABLE_BULK=0 | ||
|
||
EXPOSE 8080 | ||
|
||
CMD ["./reacher_backend"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.