diff --git a/.github/workflows/sub-image-check.yml b/.github/workflows/sub-image-check.yml index e7a3b53..b29bf20 100644 --- a/.github/workflows/sub-image-check.yml +++ b/.github/workflows/sub-image-check.yml @@ -33,6 +33,8 @@ jobs: if: github.ref_name == 'main' working-directory: . run: | + apt-get update + apt-get install -y libssl-dev pkg-config cargo build --release --target x86_64-unknown-linux-gnu cargo build --release --target aarch64-unknown-linux-gnu diff --git a/sub-image/src/routes.rs b/sub-image/src/routes.rs index 04c0116..4672aca 100644 --- a/sub-image/src/routes.rs +++ b/sub-image/src/routes.rs @@ -23,7 +23,8 @@ pub async fn root_get() -> Json { pub async fn convert_post( body: Json, ) -> Result> { - let backend_host = std::env::var("BACKEND_HOST").unwrap(); + let backend_host = + std::env::var("BACKEND_HOST").unwrap_or_else(|_| "http://localhost:3000".to_string()); info!("Convert: {:?}", body); let base_image = reqwest::get(&if body.url.starts_with('/') { format!("{}{}", backend_host, body.url)