-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added some docker configuration, converting to config.yml args soon
- Loading branch information
1 parent
9b58a2a
commit 03cab69
Showing
5 changed files
with
72 additions
and
9 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
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,34 @@ | ||
# Use a more recent version of Rust | ||
FROM rust:1.82 AS builder | ||
|
||
# Set the working directory in the container | ||
WORKDIR /usr/src/app | ||
|
||
# Copy the current directory contents into the container | ||
COPY . . | ||
|
||
# Build the application | ||
RUN cargo build --release | ||
|
||
# Use Ubuntu as the base image for the final stage | ||
FROM ubuntu:22.04 | ||
|
||
# Install necessary runtime libraries | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
libssl3 \ | ||
supervisor \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy the binary and supervisor config | ||
COPY --from=builder /usr/src/app/target/release/hash_hunter /usr/local/bin/hash_hunter | ||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf | ||
|
||
# Set the working directory | ||
WORKDIR /usr/src/app | ||
|
||
# Create directory for persistent storage | ||
RUN mkdir -p /usr/src/app/gen | ||
|
||
# Use supervisor to manage the process | ||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] |
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 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