Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/h2-keystrokes' into deve…
Browse files Browse the repository at this point in the history
…lopment
  • Loading branch information
Timtam committed Sep 11, 2024
2 parents cd48c39 + 2769984 commit 683e777
Show file tree
Hide file tree
Showing 5 changed files with 5,193 additions and 267 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk
Expand Down
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,21 @@ COPY ./client/ ./server/Cargo.toml /app/

RUN npm run build

FROM rust:1.80-slim-bookworm AS server_build_image
FROM rust:1.81-slim-bookworm AS server_build_image

# create a new empty shell project
RUN apt-get update && apt-get -y install libssl-dev pkg-config && \
USER=root cargo new --bin hitster

WORKDIR /hitster

# copy over your manifests
COPY ./server/Cargo.lock ./Cargo.lock
COPY ./server/Cargo.toml ./Cargo.toml

# this build step will cache your dependencies
RUN cargo build --release
RUN rm src/*.rs
RUN cargo build --release && \
rm src/*.rs

# copy your source tree
COPY ./server/migrations ./migrations
Expand All @@ -35,8 +37,8 @@ COPY ./server/build.rs ./build.rs
COPY ./server/etc ./etc

# build for release
RUN rm ./target/release/deps/hitster*
RUN cargo build --release
RUN rm ./target/release/deps/hitster* && \
cargo build --release

# our final bases, platform-dependent

Expand Down
Loading

0 comments on commit 683e777

Please sign in to comment.