Skip to content

Commit

Permalink
backend image rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
saisab29 committed Jan 2, 2025
1 parent 22fc92b commit 1477293
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down
3 changes: 2 additions & 1 deletion backend/api/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -52,7 +53,7 @@ async fn main() {
std::process::exit(1);
}
};

let cors = CorsLayer::new()
.allow_origin("http://localhost:3000".parse::<HeaderValue>().unwrap())
.allow_methods([Method::GET, Method::POST, Method::PATCH, Method::DELETE])
Expand Down

0 comments on commit 1477293

Please sign in to comment.