From b42260bd109044d812fa40e765230a0f4cca7c76 Mon Sep 17 00:00:00 2001 From: Alexey Aristov Date: Mon, 8 Sep 2025 13:45:37 +0200 Subject: [PATCH] remove reqwest dependecy, build hulylake server only Signed-off-by: Alexey Aristov --- .dockerignore | 4 ++++ .github/workflows/build.yaml | 4 ++-- Cargo.lock | 15 --------------- server/Dockerfile => Dockerfile | 4 ++-- Justfile | 4 ++-- server/Cargo.toml | 5 ----- 6 files changed, 10 insertions(+), 26 deletions(-) create mode 100644 .dockerignore rename server/Dockerfile => Dockerfile (96%) diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..e75469be2c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +target/ +.git/ +.jj/ +.cargo/ \ No newline at end of file diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d990eb67f7..70ca5b8bd0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -25,7 +25,7 @@ jobs: - name: Build and Push uses: docker/build-push-action@v6 with: - file: server/Dockerfile + file: Dockerfile push: true - tags: "${{ vars.DOCKER_USER }}/service_hulylake:latest" + tags: "${{ vars.DOCKER_USER }}/service_hulylake:${{ env.VERSION }},${{ vars.DOCKER_USER }}/service_hulylake:latest" platforms: linux/amd64,linux/arm64 diff --git a/Cargo.lock b/Cargo.lock index c6e24ec801..ed03ee77de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2311,7 +2311,6 @@ dependencies = [ "md5", "mime", "refinery", - "reqwest", "secrecy", "serde", "serde_json", @@ -4043,7 +4042,6 @@ dependencies = [ "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-streams", "web-sys", "webpki-roots 1.0.2", ] @@ -5951,19 +5949,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "wasm-streams" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" -dependencies = [ - "futures-util", - "js-sys", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "wasm-timer" version = "0.2.5" diff --git a/server/Dockerfile b/Dockerfile similarity index 96% rename from server/Dockerfile rename to Dockerfile index 3574729cce..bdadccecd8 100644 --- a/server/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ RUN \ if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ apt-get update && apt-get install -y cmake \ && rm -rf /var/lib/apt/lists/* ; \ - cargo build --release --target=x86_64-unknown-linux-gnu ; \ + cargo build --release --target=x86_64-unknown-linux-gnu --package hulylake; \ elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ apt-get update && apt-get install -y \ gcc-aarch64-linux-gnu \ @@ -23,7 +23,7 @@ RUN \ export CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++ ; \ export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc ; \ cargo tree --target=aarch64-unknown-linux-gnu ; \ - cargo build --release --target=aarch64-unknown-linux-gnu ; \ + cargo build --release --target=aarch64-unknown-linux-gnu --package hulylake ; \ else \ echo "Unexpected target platform: $TARGETPLATFORM" && exit 1 ; \ fi diff --git a/Justfile b/Justfile index 825705f974..8648ef0693 100644 --- a/Justfile +++ b/Justfile @@ -1,2 +1,2 @@ -image: - cd server && docker buildx build --tag=hardcoreeng/hulylake:latest --platform=linux/amd64 --load . \ No newline at end of file +image platform='linux/amd64': + cd server && docker buildx build --tag=hardcoreeng/hulylake:latest --platform={{platform}} --load . \ No newline at end of file diff --git a/server/Cargo.toml b/server/Cargo.toml index d25f899bf7..5605cfbe68 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -31,11 +31,6 @@ secrecy = "0.10.3" tracing-actix-web = "0.7.19" aws-config = { version = "1.8.5" } aws-sdk-s3 = "1.103.0" -reqwest = { version = "0.12.15", default-features = false, features = [ - "json", - "rustls-tls", - "stream", -] } futures-util = "0.3.31" tokio-stream = "0.1.17" thiserror = "2.0.16"