Add native aoostar-rs container variant

This commit is contained in:
2026-06-09 16:16:47 +02:00
parent b48bbd9b2e
commit be41c92e7b
5 changed files with 181 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
target
.git
.github
.idea
*.iml
book
+33
View File
@@ -46,6 +46,39 @@ Important:
- the native path currently targets custom image panels; built-in vendor sensor themes are not yet
reimplemented in the web UI
## Native Container Variant
This fork also ships a separate containerized Unraid-friendly variant based purely on `aoostar-rs`.
Files:
- `container/Dockerfile`
- `container/entrypoint.sh`
- `container/unraid/aoostar-rs-webui.xml`
Build locally from the repository root:
```bash
docker build -f container/Dockerfile -t aoostar-rs-webui:latest .
```
Example run:
```bash
docker run -d \
--name aoostar-rs-webui \
--device /dev/ttyACM0:/dev/ttyACM0 \
-p 8080:8080 \
-v /mnt/user/appdata/aoostar-rs/config:/config \
aoostar-rs-webui:latest
```
The container starts only the native Rust stack:
- `aster-webui` on port `8080`
- direct LCD rotation through `aoostar-rs`
- no vendor binary and no `_MEI*/sys_img` runtime sync
## Disclaimer
> I take no responsibility for the use of this software.
+42
View File
@@ -0,0 +1,42 @@
FROM rust:1.88-bookworm AS builder
WORKDIR /build
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
pkg-config \
libudev-dev \
&& rm -rf /var/lib/apt/lists/*
COPY . /build
RUN cargo build --release -p aster-webui
FROM debian:bookworm-slim
ENV CONFIG_DIR=/config \
PORT=8080 \
ASTER_DEVICE=/dev/ttyACM0 \
ASTER_USB= \
ASTER_SIMULATE=0 \
ASTER_WRITE_ONLY=0 \
ASTER_DISABLE_DISPLAY=0
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
bash \
libudev1 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /build/target/release/aster-webui /usr/local/bin/aster-webui
COPY container/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod 0755 /usr/local/bin/aster-webui /usr/local/bin/entrypoint.sh
EXPOSE 8080
VOLUME ["/config"]
CMD ["/usr/local/bin/entrypoint.sh"]
+69
View File
@@ -0,0 +1,69 @@
#!/usr/bin/env bash
set -euo pipefail
CONFIG_DIR="${CONFIG_DIR:-/config}"
PORT="${PORT:-8080}"
ASTER_DEVICE="${ASTER_DEVICE:-}"
ASTER_USB="${ASTER_USB:-}"
ASTER_SIMULATE="${ASTER_SIMULATE:-0}"
ASTER_WRITE_ONLY="${ASTER_WRITE_ONLY:-0}"
ASTER_DISABLE_DISPLAY="${ASTER_DISABLE_DISPLAY:-0}"
mkdir -p "${CONFIG_DIR}" "${CONFIG_DIR}/img"
ARGS=(
"--config-dir" "${CONFIG_DIR}"
"--bind" "0.0.0.0:${PORT}"
)
if [[ -n "${ASTER_DEVICE}" ]]; then
ARGS+=("--device" "${ASTER_DEVICE}")
fi
if [[ -n "${ASTER_USB}" ]]; then
ARGS+=("--usb" "${ASTER_USB}")
fi
if [[ "${ASTER_SIMULATE}" == "1" ]]; then
ARGS+=("--simulate")
fi
if [[ "${ASTER_WRITE_ONLY}" == "1" ]]; then
ARGS+=("--write-only")
fi
if [[ "${ASTER_DISABLE_DISPLAY}" == "1" ]]; then
ARGS+=("--disable-display")
fi
echo "Starting aster-webui native container"
echo "Config directory: ${CONFIG_DIR}"
echo "WebUI port: ${PORT}"
echo "Display mode: $(
if [[ "${ASTER_DISABLE_DISPLAY}" == "1" ]]; then
printf '%s' 'disabled'
elif [[ "${ASTER_SIMULATE}" == "1" ]]; then
printf '%s' 'simulate'
elif [[ -n "${ASTER_DEVICE}" ]]; then
printf 'device:%s' "${ASTER_DEVICE}"
elif [[ -n "${ASTER_USB}" ]]; then
printf 'usb:%s' "${ASTER_USB}"
else
printf '%s' 'default-usb'
fi
)"
APP_PID=""
shutdown() {
if [[ -n "${APP_PID}" ]] && kill -0 "${APP_PID}" >/dev/null 2>&1; then
kill -TERM "${APP_PID}" >/dev/null 2>&1 || true
wait "${APP_PID}" || true
fi
}
trap shutdown INT TERM
/usr/local/bin/aster-webui "${ARGS[@]}" &
APP_PID="$!"
wait "${APP_PID}"
+31
View File
@@ -0,0 +1,31 @@
<?xml version="1.0"?>
<Container version="2">
<Name>AOOSTAR-RS-WebUI</Name>
<Repository>aoostar-rs-webui:latest</Repository>
<Registry />
<Network>bridge</Network>
<MyIP />
<Shell>sh</Shell>
<Privileged>false</Privileged>
<Support>http://10.1.1.4:3000/magges/aoostar-rs</Support>
<Project>http://10.1.1.4:3000/magges/aoostar-rs</Project>
<Overview>Native AOOSTAR WTR MAX / GEM12+ PRO container based on aoostar-rs. Fuehrt die neue Rust-WebUI und die Display-Rotation direkt ohne Hersteller-Binary aus.</Overview>
<Category>Tools:</Category>
<WebUI>http://[IP]:[PORT:8080]/</WebUI>
<Icon>http://10.1.1.4:3000/magges/unraid-aoostar-x/raw/branch/main/unraid/icon.png</Icon>
<ExtraParams />
<PostArgs />
<CPUset />
<DateInstalled>1749470000</DateInstalled>
<DonateText />
<DonateLink />
<Requires>Durchgereichtes Display-Geraet, typischerweise /dev/ttyACM0. Nutzt nur aoostar-rs, keine Hersteller-Binary.</Requires>
<Config Name="WebUI Port" Target="8080" Default="8080" Mode="tcp" Description="Host port for the native aoostar-rs WebUI." Type="Port" Display="always" Required="true" Mask="false">8080</Config>
<Config Name="Config Path" Target="/config" Default="/mnt/user/appdata/aoostar-rs/config" Mode="rw" Description="Path containing Monitor3.json and img assets." Type="Path" Display="always" Required="true" Mask="false">/mnt/user/appdata/aoostar-rs/config</Config>
<Config Name="Display Device" Target="/dev/ttyACM0" Default="/dev/ttyACM0" Mode="rw" Description="AOOSTAR display USB serial device." Type="Device" Display="always" Required="true" Mask="false">/dev/ttyACM0</Config>
<Config Name="ASTER_DEVICE" Target="ASTER_DEVICE" Default="/dev/ttyACM0" Mode="" Description="Device path passed into aster-webui." Type="Variable" Display="advanced" Required="false" Mask="false">/dev/ttyACM0</Config>
<Config Name="ASTER_USB" Target="ASTER_USB" Default="" Mode="" Description="Optional USB VID:PID override. Leave blank to use ASTER_DEVICE or the default AOOSTAR USB UART." Type="Variable" Display="advanced" Required="false" Mask="false"></Config>
<Config Name="ASTER_WRITE_ONLY" Target="ASTER_WRITE_ONLY" Default="0" Mode="" Description="Set to 1 to skip the LCD initialization check and only write frames." Type="Variable" Display="advanced" Required="false" Mask="false">0</Config>
<Config Name="ASTER_DISABLE_DISPLAY" Target="ASTER_DISABLE_DISPLAY" Default="0" Mode="" Description="Set to 1 to run only the WebUI without talking to the LCD." Type="Variable" Display="advanced" Required="false" Mask="false">0</Config>
<Config Name="ASTER_SIMULATE" Target="ASTER_SIMULATE" Default="0" Mode="" Description="Set to 1 for a simulation-only container without the real display device." Type="Variable" Display="advanced" Required="false" Mask="false">0</Config>
</Container>