Merge branch 'unstable'
This commit is contained in:
11
bililive.observer/Dockerfile
Normal file
11
bililive.observer/Dockerfile
Normal 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"]
|
||||||
@@ -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
|
|
||||||
11
bililive.observer/deploy.sh
Normal file
11
bililive.observer/deploy.sh
Normal 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
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user