Skip to content

Commit

Permalink
apply caching strategies to run with importer dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mayconamaroCW committed Jun 12, 2024
1 parent 3da21fd commit 170c09c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions docker/Dockerfile.run_with_importer
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ COPY Cargo.toml Cargo.lock /app/
COPY .cargo /app/.cargo
RUN mkdir src && echo "fn main() {}" > src/main.rs
RUN mkdir src/bin/ && echo "fn main() {}" > src/bin/run_with_importer.rs
RUN cargo build --release --bin run-with-importer --features metrics
RUN cargo build --release --bin run-with-importer --features metrics,rocks,kubernetes
RUN rm -r src

# Build stage
Expand All @@ -37,18 +37,13 @@ COPY --from=deps /app/Cargo.lock /app/Cargo.lock
COPY --from=deps /app/.cargo /app/.cargo

# Copy the rest of the application code
COPY src /app/src
COPY static /app/static
COPY .sqlx /app/.sqlx
COPY build.rs /app/build.rs
COPY config /app/config
COPY proto /app/proto
COPY src /app/src

RUN cargo build --release --bin run-with-importer --features metrics

ENV CARGO_PROFILE_RELEASE_DEBUG=1
ENV LOG_FORMAT=json
ENV NO_COLOR=1
RUN cargo build --release --bin run-with-importer --features metrics,rocks,kubernetes

# Runtime
Expand Down

0 comments on commit 170c09c

Please sign in to comment.