From 1477293485a0da21bd9aa22bafe6eab12ed0cbb4 Mon Sep 17 00:00:00 2001 From: saisab29 Date: Thu, 2 Jan 2025 13:49:39 +0545 Subject: [PATCH] backend image rebuild --- backend/api/Dockerfile | 2 +- backend/api/src/main.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/api/Dockerfile b/backend/api/Dockerfile index 71131f3..0aad566 100644 --- a/backend/api/Dockerfile +++ b/backend/api/Dockerfile @@ -34,7 +34,7 @@ RUN apt-get update && apt-get install -y \ WORKDIR /app # Copy the migrations folder to the runtime stage -COPY --from=builder /app/migrations ./migrations +# COPY --from=builder /app/migrations ./migrations # Copy the binary COPY --from=builder /app/target/release/api . diff --git a/backend/api/src/main.rs b/backend/api/src/main.rs index 36a37f5..b9b0a35 100644 --- a/backend/api/src/main.rs +++ b/backend/api/src/main.rs @@ -37,6 +37,7 @@ async fn run_migrations(pool: &sqlx::PgPool) -> Result<(), sqlx::Error> { async fn main() { dotenv().ok(); + let database_url = std::env::var("DATABASE_URL").expect("DATABASE_URL must be set"); let pool = match PgPoolOptions::new() .max_connections(10) @@ -52,7 +53,7 @@ async fn main() { std::process::exit(1); } }; - + let cors = CorsLayer::new() .allow_origin("http://localhost:3000".parse::().unwrap()) .allow_methods([Method::GET, Method::POST, Method::PATCH, Method::DELETE])