This is an automated email from the ASF dual-hosted git repository.

hgruszecki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iggy.git


The following commit(s) were added to refs/heads/master by this push:
     new 812457424 feat(server): enable embedded Web UI by default (#2497)
812457424 is described below

commit 812457424eb8191c743676f952c7776015773341
Author: Hubert Gruszecki <[email protected]>
AuthorDate: Wed Dec 17 21:58:51 2025 +0100

    feat(server): enable embedded Web UI by default (#2497)
    
    Make iggy-web a default feature so the embedded
    Web UI is included in all server builds without
    requiring explicit --features flag.
---
 .github/workflows/_build_rust_artifacts.yml | 8 ++++++++
 Dockerfile                                  | 3 +++
 core/server/Cargo.toml                      | 2 +-
 core/server/Dockerfile                      | 5 ++++-
 4 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/_build_rust_artifacts.yml 
b/.github/workflows/_build_rust_artifacts.yml
index f5b3c5006..14c8e7904 100644
--- a/.github/workflows/_build_rust_artifacts.yml
+++ b/.github/workflows/_build_rust_artifacts.yml
@@ -107,6 +107,14 @@ jobs:
       - name: Add Rust target
         run: rustup target add ${{ matrix.target }}
 
+      - name: Setup Node.js
+        uses: actions/setup-node@v4
+        with:
+          node-version: "22"
+
+      - name: Build Web UI static files
+        run: npm --prefix web ci && npm --prefix web run build:static
+
       - name: Build binaries
         run: |
           binaries="${{ inputs.binaries }}"
diff --git a/Dockerfile b/Dockerfile
index d70decfb4..e70448d2a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -26,8 +26,11 @@ RUN apt-get update && apt-get install -y \
     libssl-dev \
     libhwloc-dev \
     libudev-dev \
+    nodejs \
+    npm \
     && rm -rf /var/lib/apt/lists/*
 COPY . .
+RUN npm --prefix web ci && npm --prefix web run build:static
 RUN cargo build --bin iggy --release
 RUN cargo build --bin iggy-server --release
 
diff --git a/core/server/Cargo.toml b/core/server/Cargo.toml
index bbd5e699e..d10f082f5 100644
--- a/core/server/Cargo.toml
+++ b/core/server/Cargo.toml
@@ -32,7 +32,7 @@ name = "iggy-server"
 path = "src/main.rs"
 
 [features]
-default = ["mimalloc"]
+default = ["mimalloc", "iggy-web"]
 disable-mimalloc = []
 mimalloc = ["dep:mimalloc"]
 iggy-web = ["dep:rust-embed", "dep:mime_guess"]
diff --git a/core/server/Dockerfile b/core/server/Dockerfile
index 9592adb3b..5e4fd8e93 100644
--- a/core/server/Dockerfile
+++ b/core/server/Dockerfile
@@ -34,7 +34,7 @@ ARG LIBC=musl
 ARG IGGY_CI_BUILD
 ENV IGGY_CI_BUILD=${IGGY_CI_BUILD}
 
-RUN apk add --no-cache zig make autoconf automake libtool pkgconfig hwloc-dev 
xz-dev xz-static && \
+RUN apk add --no-cache zig make autoconf automake libtool pkgconfig hwloc-dev 
xz-dev xz-static nodejs npm && \
     cargo install cargo-zigbuild --locked && \
     rustup target add \
     x86_64-unknown-linux-musl \
@@ -65,6 +65,9 @@ RUN 
--mount=type=cache,target=/usr/local/cargo/registry,id=cargo-registry-${TARG
 
 COPY . .
 
+# Build Web UI static files for embedding
+RUN npm --prefix web ci && npm --prefix web run build:static
+
 RUN 
--mount=type=cache,target=/usr/local/cargo/registry,id=cargo-registry-${TARGETPLATFORM}-${LIBC}
 \
     
--mount=type=cache,target=/usr/local/cargo/git,id=cargo-git-${TARGETPLATFORM}-${LIBC}
 \
     
--mount=type=cache,target=/app/target,id=cargo-target-${TARGETPLATFORM}-${LIBC} 
\

Reply via email to