Skip to content

Commit

Permalink
feat: 🎸 小雅默认端口改为5678
Browse files Browse the repository at this point in the history
  • Loading branch information
monlor committed May 30, 2024
1 parent 7d4b8c9 commit 8206829
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
4 changes: 2 additions & 2 deletions alist/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM xiaoyaliu/alist:latest
FROM xiaoyaliu/alist:hostmode

LABEL MAINTAINER [email protected]
LABEL VERSION 1.1.0

EXPOSE 80 2345 2346
EXPOSE 5678 2345 2346

VOLUME /data

Expand Down
8 changes: 4 additions & 4 deletions alist/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ if [ ! -d "/data" ]; then
mkdir /data
fi

# 修改端口
sed -i -E "s/listen [0-9]+/listen ${PORT:=5678}/g" /etc/nginx/http.d/default.conf
sed -i -E "s/listen \[::\]:[0-9]+/listen [::]:${PORT}/g" /etc/nginx/http.d/default.conf
# 设置端口
local_ip=$(ip a | grep inet | grep -v '127.0.0.1|inet6' | awk '{print $2}' | cut -d/ -f1)
echo "http://$local_ip:5678" > /data/docker_address.txt

# 生成配置,阿里云token
if [ ${#ALIYUN_TOKEN} -ne 32 ]; then
echo "长度不对,阿里云盘 Token是32位长"
Expand Down
5 changes: 5 additions & 0 deletions emby/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/sh

echo "等待alist启动完成..."
while ! wget -q -T 1 -O /dev/null http://${ALIST_DOMAIN}:${ALIST_PORT:=5678} &> /dev/null; do
sleep 2
done

echo "等待元数据下载完成..."
while test ! -f /config/emby_meta_finished; do
sleep 2
Expand Down
2 changes: 1 addition & 1 deletion glue/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

echo "等待alist启动完成..."
while ! curl -s -f -m 1 "${ALIST_ADDR:=http://alist:80}" > /dev/null; do
while ! curl -s -f -m 1 "${ALIST_ADDR:=http://alist:5678}" > /dev/null; do
sleep 2
done

Expand Down
2 changes: 1 addition & 1 deletion jellyfin/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

echo "等待alist启动完成..."
while ! curl -s -f -m 1 http://${ALIST_DOMAIN} &> /dev/null; do
while ! curl -s -f -m 1 http://${ALIST_DOMAIN}:${ALIST_PORT:=5678} &> /dev/null; do
sleep 2
done

Expand Down

0 comments on commit 8206829

Please sign in to comment.