Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auth-server: Fix dockerfile after crate refactor #55

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading