Skip to content

Commit

Permalink
auth-server: Fix dockerfile after crate refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
joeykraut committed Oct 25, 2024
1 parent c05555c commit 064854e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions auth/auth-server/Dockerfile → auth/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN cargo install cargo-chef
FROM chef AS sources
WORKDIR /build
COPY ./Cargo.toml ./Cargo.lock ./
COPY ./auth-server ./auth-server
COPY ./auth ./auth

# === Builder === #
# Pull the sources into their own layer
Expand All @@ -33,13 +33,13 @@ RUN apt-get update && \
apt-get install -y pkg-config libssl-dev libclang-dev libpq-dev ca-certificates

# Update Cargo.toml to include only "auth-server" in workspace members
RUN sed -i '/members[[:space:]]*=[[:space:]]*\[/,/\]/c\members = ["auth-server"]' Cargo.toml
RUN sed -i '/members[[:space:]]*=[[:space:]]*\[/,/\]/c\members = ["auth/auth-server"]' Cargo.toml
RUN cargo chef prepare --recipe-path recipe.json --bin auth-server

# Build only the dependencies to cache them in this layer
RUN cargo chef cook --release --recipe-path recipe.json

COPY --from=sources /build/auth-server /build/auth-server
COPY --from=sources /build/auth /build/auth
WORKDIR /build

RUN cargo build --release -p auth-server
Expand Down
2 changes: 1 addition & 1 deletion auth/auth-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub struct Cli {
#[arg(long, env = "PORT", default_value = "3000")]
pub port: u16,
/// Whether to enable datadog logging
#[arg(long)]
#[arg(long, env = "DATADOG_LOGGING_ENABLED")]
pub datadog_logging: bool,
}

Expand Down

0 comments on commit 064854e

Please sign in to comment.