From 19b812ba0a53f64a35e1a82a062ece560ee7aab2 Mon Sep 17 00:00:00 2001 From: Tim Nebel Date: Fri, 7 Mar 2025 11:47:31 +0000 Subject: [PATCH] feat(build): add prod target --- Cargo.toml | 9 ++++++++- Dockerfile | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 84aa610..2ae8e02 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,14 @@ name = "account" version = "0.1.0" edition = "2024" - +[profile.prod] +inherits = "release" +overflow-checks = false +strip = true +debug = false +debug-assertions = false +lto = true +incremental = false [dependencies] rocket = "0.5.1" diff --git a/Dockerfile b/Dockerfile index 10b2c0f..b0bab6a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ WORKDIR /app COPY . . -RUN cargo build --release +RUN cargo build --profile release-lto RUN rm .env