mirror of
https://github.com/icodex/docker-goedge.git
synced 2026-03-14 05:46:26 -05:00
update
This commit is contained in:
@@ -24,18 +24,30 @@ function install_edges() {
|
||||
|
||||
case "$1" in
|
||||
"admin")
|
||||
TAR_URL="https://dl.goedge.cn/edge/v${VERSION}/edge-admin-linux-${GOARCH}-plus-v${VERSION}.zip"
|
||||
TAR_URL="https://static-file-global.353355.xyz/goedge/edge-admin-linux-${GOARCH}-plus-v${VERSION}.zip"
|
||||
TAR_FILE="edge-admin-linux-${GOARCH}-plus-v${VERSION}.zip"
|
||||
|
||||
mv /build/run_admin.sh ${ROOT_DIR}/run.sh
|
||||
;;
|
||||
"node")
|
||||
apk add --no-cache nftables
|
||||
TAR_URL="https://dl.goedge.cn/edge-node/v${VERSION}/edge-node-linux-${GOARCH}-plus-v${VERSION}.zip"
|
||||
TAR_URL="https://static-file-global.353355.xyz/goedge/edge-node-linux-${GOARCH}-plus-v${VERSION}.zip"
|
||||
TAR_FILE="edge-node-linux-${GOARCH}-plus-v${VERSION}.zip"
|
||||
|
||||
mv /build/run_node.sh ${ROOT_DIR}/run.sh
|
||||
;;
|
||||
"user")
|
||||
TAR_URL="https://static-file-global.353355.xyz/goedge/edge-user-linux-${GOARCH}-v${VERSION}.zip"
|
||||
TAR_FILE="edge-user-linux-${GOARCH}-v${VERSION}.zip"
|
||||
|
||||
mv /build/run_user.sh ${ROOT_DIR}/run.sh
|
||||
;;
|
||||
"dns")
|
||||
TAR_URL="https://static-file-global.353355.xyz/goedge/edge-dns-linux-${GOARCH}-v${VERSION}.zip"
|
||||
TAR_FILE="edge-dns-linux-${GOARCH}-v${VERSION}.zip"
|
||||
|
||||
mv /build/run_dns.sh ${ROOT_DIR}/run.sh
|
||||
;;
|
||||
*)
|
||||
echo "unknown type: ${1}"
|
||||
exit
|
||||
|
||||
@@ -1,4 +1,16 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
. /build/set_hosts.sh
|
||||
|
||||
cat <<EOF
|
||||
"开心版激活方式"
|
||||
"浏览器访问管理平台,依次点击「系统设置」,「商业版本」,「激活」,直接粘贴下方提供的旗舰版注册码即可完成离线激活,终身有效;"
|
||||
"或者参考此篇提供的五种获取注册码的方式:https://www.nodeseek.com/post-138160-1"
|
||||
|
||||
"F4BuVYEKSDWV+I13ISd5NUyBcWOlH0af4/ow9obzYBS3XvYC9IsK86k5UDyyBv9vqJWN2/FQTDbPyuAO0zxYlkLDC0c8rrShs+7PAkqM0O8wBIGknzForgidDZahky5Lo/ZWaPZ1dVFUxmV29ykb0I0b4tv7Q3OtnTylOuzf//MYrlvyw6VJQMGnsttmeHzsNL/r0yDONOEXZoGoLZsuBKnkfXt+qt6bZF+kM1ncbh+sY42BrPTWQ12sXqJS3qHlzU0FFl9lTNzLGYYhq5vi/4sJuPVE50/uLCtslTJdb9zOGR915hnM+jHYsR+jUk0QxOqtreaHpsvNuLkexXbkmA==")
|
||||
|
||||
EOF
|
||||
|
||||
set_hosts
|
||||
ROOT_DIR='/usr/local/goedge'
|
||||
${ROOT_DIR}/edge-admin/bin/edge-admin
|
||||
|
||||
20
docker/build/run_dns.sh
Executable file
20
docker/build/run_dns.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
. /build/set_hosts.sh
|
||||
|
||||
function pre_config() {
|
||||
if [ ! -e ${ROOT_DIR}/edge-dns/configs/api_dns.yaml ]; then
|
||||
touch ${ROOT_DIR}/edge-dns/configs/api_dns.yaml
|
||||
cat >> ${ROOT_DIR}/edge-dns/configs/api_dns.yaml << EOF
|
||||
rpc.endpoints: [ "${ENDPOINTS}" ]
|
||||
clusterId: "${CLUSTERID}"
|
||||
secret: "${SECRET}"
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
ROOT_DIR='/usr/local/goedge'
|
||||
|
||||
set_hosts
|
||||
pre_config
|
||||
${ROOT_DIR}/edge-dns/bin/edge-dns
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
ROOT_DIR='/usr/local/goedge'
|
||||
. /build/set_hosts.sh
|
||||
|
||||
function pre_config() {
|
||||
if [ ! -e ${ROOT_DIR}/edge-node/configs/api_cluster.yaml ]; then
|
||||
@@ -13,8 +13,11 @@ EOF
|
||||
fi
|
||||
}
|
||||
|
||||
ROOT_DIR='/usr/local/goedge'
|
||||
|
||||
mkdir -p /opt/cache
|
||||
chmod 777 /opt/cache
|
||||
|
||||
set_hosts
|
||||
pre_config
|
||||
${ROOT_DIR}/edge-node/bin/edge-node
|
||||
|
||||
20
docker/build/run_user.sh
Executable file
20
docker/build/run_user.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
. /build/set_hosts.sh
|
||||
|
||||
function pre_config() {
|
||||
if [ ! -e ${ROOT_DIR}/edge-user/configs/api_user.yaml ]; then
|
||||
touch ${ROOT_DIR}/edge-user/configs/api_user.yaml
|
||||
cat >> ${ROOT_DIR}/edge-user/configs/api_user.yaml << EOF
|
||||
rpc.endpoints: [ "${ENDPOINTS}" ]
|
||||
nodeId: "${NODEID}"
|
||||
secret: "${SECRET}"
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
ROOT_DIR='/usr/local/goedge'
|
||||
|
||||
set_hosts
|
||||
pre_config
|
||||
${ROOT_DIR}/edge-user/bin/edge-user
|
||||
13
docker/build/set_hosts.sh
Executable file
13
docker/build/set_hosts.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
function set_hosts() {
|
||||
cat > /etc/hosts <<END
|
||||
127.0.0.1 goedge.cn
|
||||
127.0.0.1 goedge.cloud
|
||||
127.0.0.1 dl.goedge.cloud
|
||||
127.0.0.1 dl.goedge.cn
|
||||
127.0.0.1 global.dl.goedge.cloud
|
||||
127.0.0.1 global.dl.goedge.cn
|
||||
END
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user