Merge branch 'unstable'

This commit is contained in:
2025-10-17 22:14:48 +08:00
parent 74e2d831be
commit 3afc0c0c4c
3 changed files with 22 additions and 15 deletions

View File

@@ -0,0 +1,11 @@
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS prepare
ARG REPO=github.com/frg2089/BiliLive.Observer TARGET_VER=0.0.9
ADD https://$REPO/releases/download/v$TARGET_VER/BiliLive.Observer.zip /mnt/
# ADD https://$REPO/releases/latest/download/BiliLive.Observer.zip /mnt/
RUN apt update && apt install -y unzip && unzip -o /mnt/BiliLive.Observer.zip -d /package
FROM mcr.microsoft.com/dotnet/aspnet:9.0
COPY --from=prepare /package /opt/obs-bililive
# ENV ASPNETCORE_URLS=http://localhost:23333
WORKDIR /opt/obs-bililive
ENTRYPOINT ["dotnet", "./BiliLive.Service.dll", "--urls", "http://0.0.0.0:5000"]

View File

@@ -1,15 +0,0 @@
[Unit]
Description=BiliLive.Obs by frg2089
[Service]
# replace by urself
User=$USER
Type=simple
ExecStart=/opt/obs-bililive/BiliLive.Service.linux-x64 --urls http://10.147.17.*:54321
# same here.
# just move `BiliLive.*` and `Microsoft.*` to /opt.
# what's left are needed in runtime (working directory).
WorkingDirectory=$HOME/.config/obs-bililive
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,11 @@
#!/bin/bash
# may be able to `sudo` the whole script?
docker run -d --name obs-bililive -p 15000:5000 frg2089/obs-bililive:0.0.9
[[ -n $(docker ps | grep 'obs-bililive') ]] && (
docker logs obs-bililive
) || {
echo "[ERROR] Failed to start bililive observer service."
exit 1
}