-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add files for Docker build + embed migrations
- Loading branch information
1 parent
c46500e
commit 236e6a4
Showing
6 changed files
with
133 additions
and
8 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.env | ||
.cargo/ | ||
.github/ | ||
.vscode/ | ||
radio/ | ||
target/ | ||
tests/ | ||
Dockerfile | ||
scripts/ | ||
Wavebreaker.toml | ||
WavebreakerRadio.toml | ||
dump.rdb |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,26 @@ | ||
# shoutout to Luca Palmieri | ||
# https://www.lpalmieri.com/posts/2020-11-01-zero-to-production-5-how-to-deploy-a-rust-application | ||
|
||
FROM rust:latest AS builder | ||
|
||
# Let's switch our working directory to `app` (equivalent to `cd app`) | ||
# The `app` folder will be created for us by Docker in case it does not | ||
# exist already. | ||
WORKDIR /app | ||
# Install the required system dependencies for our linking configuration | ||
RUN apt update && apt install lld clang -y | ||
# Copy all files from our working environment to our Docker image | ||
COPY . . | ||
# Build in release mode | ||
RUN cargo build --release | ||
|
||
# Runtime stage | ||
FROM debian:bookworm-slim AS runtime | ||
|
||
WORKDIR /app | ||
# Copy the compiled binary from the builder environment | ||
# to our runtime environment | ||
COPY --from=builder /app/target/release/wavebreaker wavebreaker | ||
# OpenSSL isn't statically linked so we need to install it | ||
RUN apt update && apt install openssl ca-certificates -y --no-install-recommends && apt autoremove -y && apt clean -y | ||
ENTRYPOINT ["./wavebreaker"] |
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