deployment-tweaks (#17)
Some checks failed
Check / Backend (push) Successful in 13m9s
Check / Frontend (push) Successful in 2m26s
Docker Build / Build and Push Frontend Image (push) Successful in 12m35s
Docker Build / Build and Push Backend Image (push) Failing after 44s

Reviewed-on: #17
Co-authored-by: Drew Galbraith <drew@tiramisu.one>
Co-committed-by: Drew Galbraith <drew@tiramisu.one>
This commit is contained in:
Drew 2025-10-19 04:07:30 +00:00 committed by Drew
parent 25eb4af14d
commit ef609f748d
3 changed files with 7 additions and 11 deletions

View file

@ -14,16 +14,12 @@ async fn main() {
let pool = database::create_pool(&binding)
.await
.expect("Failed to create database pool");
let cors = if std::env::var("RUST_ENV").unwrap_or_default() == "production" {
sqlx::migrate!().run(&pool).await.expect("Failed t");
let cors = if let Ok(domain) = std::env::var("CAPTAINS_LOG_URL") {
CorsLayer::new()
.allow_origin([
"https://tiramisu.one"
.parse::<axum::http::HeaderValue>()
.unwrap(),
"https://*.tiramisu.one"
.parse::<axum::http::HeaderValue>()
.unwrap(),
])
.allow_origin([domain.parse::<axum::http::HeaderValue>().unwrap()])
.allow_methods(Any)
.allow_headers(Any)
} else {