diff --git a/.dockerfile b/.dockerfile index dcff632..d3ec74f 100644 --- a/.dockerfile +++ b/.dockerfile @@ -41,6 +41,7 @@ RUN apk update && apk add --no-cache \ php-dev \ php-pear-grpc \ curl \ + wget \ git # 安装gRPC扩展 @@ -54,25 +55,26 @@ RUN mkdir -p /usr/local/sillyGirl \ && ARCH=$(uname -m) \ && DOWNLOAD_URL="" \ && if [ "$ARCH" = "x86_64" ]; then \ - DOWNLOAD_URL="https://github.com/cdle/sillyGirl/releases/download/main/sillyGirl_linux_amd64"; \ + DOWNLOAD_URL="/releases/download/main/sillyGirl_linux_amd64"; \ elif [ "$ARCH" = "aarch64" ]; then \ - DOWNLOAD_URL="https://github.com/cdle/sillyGirl/releases/download/main/sillyGirl_linux_arm64"; \ + DOWNLOAD_URL="/releases/download/main/sillyGirl_linux_arm64"; \ elif [ "$ARCH" = "armv7l" ]; then \ - DOWNLOAD_URL="https://github.com/cdle/sillyGirl/releases/download/main/sillyGirl_linux_armv7"; \ + DOWNLOAD_URL="/releases/download/main/sillyGirl_linux_armv7"; \ else \ echo "Unsupported architecture: $ARCH"; \ exit 1; \ fi \ - && curl -sSL --connect-timeout 20 -f "$DOWNLOAD_URL" -o /usr/local/sillyGirl/sillyGirl \ + && curl -L -sSL -f "https://gitee.com/sillybot/sillyGirl$DOWNLOAD_URL" -o /usr/local/sillyGirl/sillyGirl \ || (echo "Download from original address failed, trying proxy address..." \ - && curl -sSL --connect-timeout 60 -f https://ghproxy.com/"$DOWNLOAD_URL" -o /usr/local/sillyGirl/sillyGirl) \ + && curl -sSL --connect-timeout 10 -f "https://github.com/cdle/sillyGirl$DOWNLOAD_URL" -o /usr/local/sillyGirl/sillyGirl) \ && chmod +x /usr/local/sillyGirl/sillyGirl # 设置工作目录 WORKDIR /usr/local/sillyGirl - +ENV PATH="/usr/local/sillyGirl/language/node/yarn:${PATH}" +ENV PATH="/usr/local/sillyGirl/language/node:${PATH}" ENV SILLYGIRL_DATA_PATH=/usr/local/sillyGirl/ # 指定容器启动时要运行的命令 diff --git a/core/grpc_asset.go b/core/grpc_asset.go index 11cd03b..a4a6377 100644 --- a/core/grpc_asset.go +++ b/core/grpc_asset.go @@ -70,7 +70,6 @@ func initLanguage() { continue } if _, err := os.Stat(node_dir + "/yarn"); err != nil { - fmt.Println(err, 1) resp, err := http.Get("https://gitee.com/sillybot/binary/releases/download/yarn/yarn.zip") if err == nil { go func() { diff --git a/main.go b/main.go index cdb08ba..8eb601a 100644 --- a/main.go +++ b/main.go @@ -77,10 +77,10 @@ func main() { fmt.Printf("\x1b[%dm%s \x1b[0m\n", 31, m[core.CONETNT]) return fmt.Sprint(i) }) - a.SetActionHandler(func(m map[string]interface{}) string { - fmt.Println(`do action: ` + string(utils.JsonMarshal(m))) - return "" - }) + // a.SetActionHandler(func(m map[string]interface{}) string { + // fmt.Println(`do action: ` + string(utils.JsonMarshal(m))) + // return "" + // }) for scanner.Scan() { data := scanner.Text()