This commit is contained in:
1-6
2023-08-09 11:43:42 +08:00
parent 2b19690add
commit 4463bea240
3 changed files with 12 additions and 11 deletions
+8 -6
View File
@@ -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/
# 指定容器启动时要运行的命令
-1
View File
@@ -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() {
+4 -4
View File
@@ -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()