diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4c49bd7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.env diff --git a/aria2/aria2.conf b/aria2/aria2.conf deleted file mode 100644 index 85ba1c9..0000000 --- a/aria2/aria2.conf +++ /dev/null @@ -1,87 +0,0 @@ -# ref: p3terx/aria2.conf - -## file allocation - -# Docker Container 内下载路径(自行挂载) -dir=/downloads -disk-cache=100M - -file-allocation=none -no-file-allocation-limit=64M - -continue=true -always-resume=false -max-resume-failure-tries=0 - -remote-time=true - -## progress (session) - -input-file=/config/aria2.session -save-session=/config/aria2.session -save-session-interval=1 -auto-save-interval=20 - -keep-unfinished-download-result=true -# force-save=true - -## Download Options - -connect-timeout=10 -timeout=10 - -max-concurrent-downloads=5 -max-connection-per-server=16 -min-split-size=4M -split=32 -piece-length=1M -allow-piece-length-change=true -http-accept-gzip=true -content-disposition-default-utf8=true - -## Client Disguise -user-agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36 Edg/93.0.961.47' -peer-id-prefix=-DE13F0- -user-agent=Deluge 1.3.15 -peer-agent=Deluge 1.3.15 - -## RPC相关设置 ## - -enable-rpc=true -rpc-allow-origin-all=true -rpc-listen-all=true -# hidden. -rpc-secret= - -## BT/PT - -listen-port=6888 -dht-listen-port=6888 -enable-dht=true -enable-dht6=true -dht-file-path=/config/dht.dat -dht-file-path6=/config/dht6.dat -dht-entry-point=dht.transmissionbt.com:6881 -dht-entry-point6=dht.transmissionbt.com:6881 -bt-enable-lpd=true -enable-peer-exchange=true - -rpc-save-upload-metadata=true -bt-save-metadata=true -bt-load-saved-metadata=true -bt-remove-unselected-file=true -follow-torrent=true - -bt-force-encryption=true - -seed-ratio=1.0 -seed-time=0 -bt-seed-unverified=true -bt-detach-seed-only=true - -bt-tracker-connect-timeout=10 -bt-tracker-timeout=10 -bt-prioritize-piece=head=32M,tail=32M - -# auto update by p3terx's tracker.sh -bt-tracker= diff --git a/aria2/docker-compose.yml b/aria2/docker-compose.yml index 83a5e7e..32730b2 100644 --- a/aria2/docker-compose.yml +++ b/aria2/docker-compose.yml @@ -10,27 +10,25 @@ services: options: max-size: 1m volumes: - - /opt/aria2:/config - - type: bind - source: $HOME/_downloads - target: /downloads + - ${PWD}:/config + # use `.env` file to set other variables + - ${HOME}/downloads:/downloads restart: 'unless-stopped' environment: - - PUID=$UID - - PGID=$UID + - PUID=${UID} + - PGID=${GID} - UMASK_SET=022 - ports: - - 16800:6800 - - 16888:6888 - - 16888:6888/udp + - UPDATE_TRACKERS=true + - TZ=Asia/Shanghai + network_mode: host + ariang: image: p3terx/ariang container_name: ariang + command: --port 6880 --ipv6 logging: driver: json-file options: max-size: 1m restart: 'unless-stopped' - ports: - - 16880:6880 - + network_mode: host diff --git a/bililive.observer/Dockerfile b/bililive.observer/Dockerfile index 4933bfc..89bef12 100644 --- a/bililive.observer/Dockerfile +++ b/bililive.observer/Dockerfile @@ -1,11 +1,12 @@ 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/ +ADD https://$REPO/releases/download/v$TARGET_VER/BiliLive.Observer.zip /mnt/ +# he has updated to dotnet 10 while I'm lazy to apply since direct run works fine +# 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"] +ENTRYPOINT ["dotnet", "./BiliLive.Service.dll"] diff --git a/bililive.observer/deploy.sh b/bililive.observer/deploy.sh index a679549..8176a25 100755 --- a/bililive.observer/deploy.sh +++ b/bililive.observer/deploy.sh @@ -2,7 +2,7 @@ # may be able to `sudo` the whole script? docker build -t frg2089/bililive:latest . -docker run -d --name obs-bililive -p 15000:5000 --restart unless-stopped frg2089/bililive:latest +docker run -d --name obs-bililive -p 5000:8080 --restart unless-stopped frg2089/bililive:latest [[ -n $(docker ps | grep 'obs-bililive') ]] && docker logs obs-bililive || { echo "[ERROR] Failed to start bililive observer service." diff --git a/jellyfin/docker-compose.yml b/jellyfin/docker-compose.yml index 7f239ef..2d838bf 100644 --- a/jellyfin/docker-compose.yml +++ b/jellyfin/docker-compose.yml @@ -3,28 +3,22 @@ services: image: nyanmisaka/jellyfin:latest container_name: jellyfin network_mode: 'host' - group_add: - # needs mapping from localhost, i.e. `getent group render | cut -d: -f3`. - # also probably needs manual `groupadd -g 993 render` inside. - - '993' volumes: - - /opt/jellyfin:/config + - /var/lib/jellyfin:/config - jellyfin-cache:/cache - - type: bind - source: /media - target: /media - # Optional - extra fonts to be used during transcoding with subtitle burn-in + - /media:/media + # - /dev/dri/renderD128:/dev/dri/renderD128 - type: bind source: /usr/share/fonts/opentype target: /usr/local/share/fonts/custom read_only: true devices: - - /dev/dri:/dev/dri + - /dev/dri/renderD128:/dev/dri/renderD128 + #- /dev/dri/card0:/dev/dri/card0 restart: 'unless-stopped' # Optional - alternative address used for autodiscovery # environment: # - JELLYFIN_PublishedServerUrl= - # Optional - may be necessary for docker healthcheck to pass if running in host network mode extra_hosts: - 'host.docker.internal:host-gateway' volumes: diff --git a/mihomo/docker-compose.yml b/mihomo/docker-compose.yml index 528eec0..56d46a9 100644 --- a/mihomo/docker-compose.yml +++ b/mihomo/docker-compose.yml @@ -13,14 +13,7 @@ services: cap_add: - ALL volumes: - - /opt/mihomo:/root/.config/mihomo + # be prepared before compose up. + - ${PWD}/config.yaml:/root/.config/mihomo/config.yaml - /dev/net/tun:/dev/net/tun - metacubexd: - container_name: metacubexd - image: ghcr.io/metacubex/metacubexd - restart: always - ports: - - '39093:80' - # environment: - # - DEFAULT_BACKEND_URL=http://192.168.1.1:9090 diff --git a/readme.md b/readme.md index 8969083..26ab825 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,17 @@ -# server-svc-sources -目前已将大多数服务全部移至 Docker,自组服务(或者说 DIY NAS)那边也不再需要总是操心硬件了。 +# agserver.svc -~~题外话:Web 还是太权威了。但`nwjs`这类独立的 Web 引擎我就很抵触了,因为玩 RPG Maker 黄油总会抛各种异常(~~ - -~~又题外话:偶然看到 LibreOffice 可以挂 Docker 当在线文档使,但我个人还是偏好最经典的 MS Office。目前桌面端的 Win、Mac、Linux 很难说谁替代谁。~~ +- cockpit dashboard + - 新版 Ubuntu 的`sudo`经 rust 重写,命令行不完全,暂时需回退为`sudo.ws` + - 需要用`nmcli`另建一空网口以便 PackageKit 正常运作 + - chrony 需要换用国内 NTP 服务器 +- mihomo(略) +- jellyfin + - 独显/按摩店核显可能仍需要刷入驱动 + - 阴特耳核显现在应该不用再进容器检查 renderD128 的用户组了。 +- OBS Bilibili 开播插件 + - 最新版本已升级为 .NET 10 运行时,懒得跟进了;作者也并不推荐用于 Docker. +- aria2 + - 防火墙提前放行 aria2 监听端口(至少放`6888/tcp,udp`) + - 除了`${PWD}`之外的环境变量均需要借助同目录下的`.env`传参;`${PWD}`我也不推荐用。 + - 我现在的`aria2.conf`与容器默认配置区别不大,等容器下载一整套`P3TERX/aria2.conf`之后自己改也行。记得改完重启容器。 +- 也许还有 koodo reader,再说吧。存储焦虑够我折腾了。 \ No newline at end of file