微信云托管官网
[2024-11-24 00:38:25] ERROR: failed to solve: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount266619587/Dockerfile: no such file or directory 这是日志[图片]第二次通过流水线部署就会产生这个问题,关闭服务重新建一个第一次才是正常的,第二次使用流水线就会这样
只要写上const OpenAI = require('openai');就会报错 package.json也已经写了依赖 这是index.js完整代码 const Koa = require("koa"); const Router = require("koa-router"); const logger = require("koa-logger"); const bodyParser = require("koa-bodyparser"); const fs = require("fs"); const path = require("path"); const axios = require('axios'); const cors = require('koa2-cors'); const { PassThrough } = require('stream'); const OpenAI = require('openai'); const { init: initDB, Counter } = require("./db"); const router = new Router(); const homePage = fs.readFileSync(path.join(__dirname, "index.html"), "utf-8"); const openai = new OpenAI({ apiKey: '', baseURL: 'https://ark.cn-beijing.volces.com/api/v3', }); router.get("/api/douyin", async (ctx) => { ctx.set('Content-Type', 'text/event-stream'); ctx.set('Cache-Control', 'no-cache'); ctx.set('Connection', 'keep-alive'); const stream = new PassThrough(); ctx.body = stream; // 获取前端传递的用户输入 const userMessage = ctx.query.message || '默认用户消息'; // Streaming: console.log('----- streaming request -----'); const aiStream = await openai.chat.completions.create({ messages: JSON.parse(userMessage), model: 'ep-20241120160801-7tnrg', stream: true, }); for await (const part of aiStream) { console.log(part.choices[0]); stream.write(`data: ${JSON.stringify(part)}\n\n`); } }) docketile文件代码 # 二开推荐阅读[如何提高项目构建效率](https://developers.weixin.qq.com/miniprogram/dev/wxcloudrun/src/scene/build/speed.html) FROM alpine:3.13 # 容器默认时区为UTC,如需使用上海时间请启用以下时区设置命令 # RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo Asia/Shanghai > /etc/timezone # 使用 HTTPS 协议访问容器云调用证书安装 RUN apk add ca-certificates # 安装依赖包,如需其他依赖包,请到alpine依赖包管理(https://pkgs.alpinelinux.org/packages?name=php8*imagick*&branch=v3.13)查找。 RUN apk add --update --no-cache nodejs npm # # 指定工作目录 WORKDIR /app # 拷贝包管理文件 COPY package*.json /app # npm 源,选用国内镜像源以提高下载速度 RUN npm config set registry https://mirrors.cloud.tencent.com/npm/ # RUN npm config set registry https://registry.npm.taobao.org/ # npm 安装依赖 RUN npm install # 将当前目录(dockerfile所在目录)下所有文件都拷贝到工作目录下(.gitignore中的文件除外) COPY . /app # 执行启动命令. # 写多行独立的CMD命令是错误写法!只有最后一行CMD命令会被执行,之前的都会被忽略,导致业务报错。 # 请参考[Docker官方文档之CMD命令](https://docs.docker.com/engine/reference/builder/#cmd) CMD ["npm", "start"] [2024-11-22 12:20:39] Started by user coding [2024-11-22 12:20:39] Running in Durability level: MAX_SURVIVABILITY [2024-11-22 12:20:41] [Pipeline] Start of Pipeline [2024-11-22 12:20:41] [Pipeline] node [2024-11-22 12:20:41] Running on Jenkins in /root/workspace [2024-11-22 12:20:41] [Pipeline] { [2024-11-22 12:20:41] [Pipeline] stage [2024-11-22 12:20:41] [Pipeline] { (检出软件包) [2024-11-22 12:20:41] Stage "检出软件包" skipped due to when conditional [2024-11-22 12:20:41] [Pipeline] } [2024-11-22 12:20:41] [Pipeline] // stage [2024-11-22 12:20:41] [Pipeline] stage [2024-11-22 12:20:41] [Pipeline] { (检出 ZIP 包) [2024-11-22 12:20:41] Stage "检出 ZIP 包" skipped due to when conditional [2024-11-22 12:20:41] [Pipeline] } [2024-11-22 12:20:41] [Pipeline] // stage [2024-11-22 12:20:41] [Pipeline] stage [2024-11-22 12:20:41] [Pipeline] { (检出代码仓库) [2024-11-22 12:20:42] [Pipeline] sh [2024-11-22 12:20:42] + git clone ****** . [2024-11-22 12:20:42] Cloning into '.'... [2024-11-22 12:20:50] [Pipeline] sh [2024-11-22 12:20:50] + git checkout master [2024-11-22 12:20:50] Already on 'master' [2024-11-22 12:20:50] Your branch is up to date with 'origin/master'. [2024-11-22 12:20:50] [Pipeline] } [2024-11-22 12:20:50] [Pipeline] // stage [2024-11-22 12:20:50] [Pipeline] stage [2024-11-22 12:20:50] [Pipeline] { (写入 dockerfile) [2024-11-22 12:20:50] Stage "写入 dockerfile" skipped due to when conditional [2024-11-22 12:20:50] [Pipeline] } [2024-11-22 12:20:50] [Pipeline] // stage [2024-11-22 12:20:50] [Pipeline] stage [2024-11-22 12:20:50] [Pipeline] { (构建 Docker 镜像) [2024-11-22 12:20:50] [Pipeline] sh [2024-11-22 12:20:51] + docker login -u ****** -p ****** ccr.ccs.tencentyun.com/tcb-******-cclm/ca-goytyvue_koa-oass:koa-oass-024-20241122122036 [2024-11-22 12:20:51] WARNING! Using --password via the CLI is insecure. Use --password-stdin. [2024-11-22 12:20:51] WARNING! Your password will be stored unencrypted in /root/.docker/config.json. [2024-11-22 12:20:51] Configure a credential helper to remove this warning. See [2024-11-22 12:20:51] https://docs.docker.com/engine/reference/commandline/login/#credentials-store [2024-11-22 12:20:51] [2024-11-22 12:20:51] Login Succeeded [2024-11-22 12:20:51] [Pipeline] sh [2024-11-22 12:20:51] + docker build -f ././/Dockerfile -t ccr.ccs.tencentyun.com/tcb-******-cclm/ca-goytyvue_koa-oass:koa-oass-024-20241122122036 ./ [2024-11-22 12:20:52] #0 building with "default" instance using docker driver [2024-11-22 12:20:52] [2024-11-22 12:20:52] #1 [internal] load build definition from Dockerfile [2024-11-22 12:20:52] #1 transferring dockerfile: 1.40kB done [2024-11-22 12:20:52] #1 DONE 0.1s [2024-11-22 12:20:52] [2024-11-22 12:20:52] #2 [internal] load .dockerignore [2024-11-22 12:20:52] #2 transferring context: 2B done [2024-11-22 12:20:52] #2 DONE 0.1s [2024-11-22 12:20:52] [2024-11-22 12:20:52] #3 [internal] load metadata for docker.io/library/alpine:3.13 [2024-11-22 12:20:53] #3 DONE 1.1s [2024-11-22 12:20:53] [2024-11-22 12:20:53] #4 [1/8] FROM docker.io/library/alpine:3.13@sha256:469b6e04ee185740477efa44ed5bdd64a07bbdd6c7e5f5d169e540889597b911 [2024-11-22 12:20:53] #4 resolve docker.io/library/alpine:3.13@sha256:469b6e04ee185740477efa44ed5bdd64a07bbdd6c7e5f5d169e540889597b911 0.1s done [2024-11-22 12:20:53] #4 sha256:469b6e04ee185740477efa44ed5bdd64a07bbdd6c7e5f5d169e540889597b911 1.64kB / 1.64kB done [2024-11-22 12:20:53] #4 sha256:16fd981ddc557fd3b38209d15e7ee8e3e6d9d4d579655e8e47243e2c8525b503 528B / 528B done [2024-11-22 12:20:53] #4 sha256:6b5c5e00213a401b500630fd8a03f6964f033ef0e3a6845c83e780fcd5deda5c 1.47kB / 1.47kB done [2024-11-22 12:20:53] #4 sha256:72cfd02ff4d01b1f319eed108b53120dea0185b916d2abeb4e6121879cbf7a65 0B / 2.83MB 0.1s [2024-11-22 12:20:54] #4 sha256:72cfd02ff4d01b1f319eed108b53120dea0185b916d2abeb4e6121879cbf7a65 2.83MB / 2.83MB 0.4s [2024-11-22 12:20:54] #4 extracting sha256:72cfd02ff4d01b1f319eed108b53120dea0185b916d2abeb4e6121879cbf7a65 0.1s done [2024-11-22 12:20:54] #4 sha256:72cfd02ff4d01b1f319eed108b53120dea0185b916d2abeb4e6121879cbf7a65 2.83MB / 2.83MB 0.4s done [2024-11-22 12:20:54] #4 DONE 0.7s [2024-11-22 12:20:54] [2024-11-22 12:20:54] #5 [internal] load build context [2024-11-22 12:20:54] #5 transferring context: 73.02MB 0.8s done [2024-11-22 12:20:54] #5 DONE 0.9s [2024-11-22 12:20:54] [2024-11-22 12:20:54] #6 [2/8] RUN apk add ca-certificates [2024-11-22 12:20:54] #6 0.214 fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz [2024-11-22 12:20:54] #6 0.747 fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz [2024-11-22 12:20:55] #6 1.223 (1/1) Installing ca-certificates (20220614-r0) [2024-11-22 12:20:55] #6 1.269 Executing busybox-1.32.1-r9.trigger [2024-11-22 12:20:55] #6 1.272 Executing ca-certificates-20220614-r0.trigger [2024-11-22 12:20:55] #6 1.301 OK: 6 MiB in 15 packages [2024-11-22 12:20:55] #6 DONE 1.6s [2024-11-22 12:20:55] [2024-11-22 12:20:55] #7 [3/8] RUN apk add --update --no-cache nodejs npm [2024-11-22 12:20:56] #7 0.317 fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz [2024-11-22 12:20:56] #7 0.585 fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz [2024-11-22 12:20:56] #7 0.769 (1/7) Installing nghttp2-libs (1.42.0-r1) [2024-11-22 12:20:56] #7 0.802 (2/7) Installing brotli-libs (1.0.9-r3) [2024-11-22 12:20:56] #7 0.840 (3/7) Installing c-ares (1.17.2-r0) [2024-11-22 12:20:56] #7 0.872 (4/7) Installing libgcc (10.2.1_pre1-r3) [2024-11-22 12:20:56] #7 0.905 (5/7) Installing libstdc++ (10.2.1_pre1-r3) [2024-11-22 12:20:56] #7 0.946 (6/7) Installing nodejs (14.20.1-r0) [2024-11-22 12:20:57] #7 1.392 (7/7) Installing npm (14.20.1-r0) [2024-11-22 12:20:57] #7 1.703 Executing busybox-1.32.1-r9.trigger [2024-11-22 12:20:57] #7 1.708 OK: 71 MiB in 22 packages [2024-11-22 12:20:57] #7 DONE 1.8s [2024-11-22 12:20:57] [2024-11-22 12:20:57] #8 [4/8] WORKDIR /app [2024-11-22 12:20:57] #8 DONE 0.2s [2024-11-22 12:20:57] [2024-11-22 12:20:57] #9 [5/8] COPY package*.json /app [2024-11-22 12:20:57] #9 DONE 0.1s [2024-11-22 12:20:57] [2024-11-22 12:20:57] #10 [6/8] RUN npm config set registry https://mirrors.cloud.tencent.com/npm/ [2024-11-22 12:20:58] #10 DONE 0.4s [2024-11-22 12:20:58] [2024-11-22 12:20:58] #11 [7/8] RUN npm install [2024-11-22 12:20:58] #11 0.751 npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@3. I'll try to do my best with it! [2024-11-22 12:20:59] #11 1.292 npm WARN deprecated koa-router@10.1.1: **IMPORTANT 10x+ PERFORMANCE UPGRADE**: Please upgrade to v12.0.1+ as we have fixed an issue with debuglog causing 10x slower router benchmark performance, see https://github.com/koajs/router/pull/173 [2024-11-22 12:21:04] #11 6.543 npm WARN wxcloudrun-koa@1.0.0 No repository field. [2024-11-22 12:21:04] #11 6.544 [2024-11-22 12:21:04] #11 6.545 added 147 packages from 200 contributors and audited 147 packages in 5.825s [2024-11-22 12:21:04] #11 6.595 [2024-11-22 12:21:04] #11 6.595 17 packages are looking for funding [2024-11-22 12:21:04] #11 6.595 run `npm fund` for details [2024-11-22 12:21:04] #11 6.595 [2024-11-22 12:21:04] #11 6.596 found 5 vulnerabilities (2 moderate, 1 high, 2 critical) [2024-11-22 12:21:04] #11 6.596 run `npm audit fix` to fix them, or `npm audit` for details [2024-11-22 12:21:04] #11 DONE 6.8s [2024-11-22 12:21:04] [2024-11-22 12:21:04] #12 [8/8] COPY . /app [2024-11-22 12:21:05] #12 DONE 0.6s [2024-11-22 12:21:05] [2024-11-22 12:21:05] #13 exporting to image [2024-11-22 12:21:05] #13 exporting layers [2024-11-22 12:21:06] #13 exporting layers 0.7s done [2024-11-22 12:21:06] #13 writing image sha256:4a5ebe5d9f58db3a45f45a4b3a4842c65a7b04477ae1dbd2d2d2d9a48855e3f4 done [2024-11-22 12:21:06] #13 naming to ccr.ccs.tencentyun.com/tcb-******-cclm/ca-goytyvue_koa-oass:koa-oass-024-20241122122036 done [2024-11-22 12:21:06] #13 DONE 0.7s [2024-11-22 12:21:06] [Pipeline] } [2024-11-22 12:21:06] [Pipeline] // stage [2024-11-22 12:21:06] [Pipeline] stage [2024-11-22 12:21:06] [Pipeline] { (推送 Docker 镜像到 TCR) [2024-11-22 12:21:06] [Pipeline] sh [2024-11-22 12:21:06] + docker push ccr.ccs.tencentyun.com/tcb-******-cclm/ca-goytyvue_koa-oass:koa-oass-024-20241122122036 [2024-11-22 12:21:06] The push refers to repository [ccr.ccs.tencentyun.com/tcb-******-cclm/ca-goytyvue_koa-oass] [2024-11-22 12:21:06] 63a6ea71939b: Preparing [2024-11-22 12:21:06] 3939b7e44f93: Preparing [2024-11-22 12:21:06] d43a2a7c1b91: Preparing [2024-11-22 12:21:06] 0dc12778368a: Preparing [2024-11-22 12:21:06] 058689fe2b3d: Preparing [2024-11-22 12:21:06] 54a29fc9b264: Preparing [2024-11-22 12:21:06] 79aadad60446: Preparing [2024-11-22 12:21:06] 7df5bd7bd262: Preparing [2024-11-22 12:21:06] 7df5bd7bd262: Layer already exists [2024-11-22 12:21:07] 058689fe2b3d: Pushed [2024-11-22 12:21:07] d43a2a7c1b91: Pushed [2024-11-22 12:21:07] 0dc12778368a: Pushed [2024-11-22 12:21:09] 79aadad60446: Pushed [2024-11-22 12:21:15] 3939b7e44f93: Pushed [2024-11-22 12:21:16] 54a29fc9b264: Pushed [2024-11-22 12:21:20] 63a6ea71939b: Pushed [2024-11-22 12:21:21] koa-oass-024-20241122122036: digest: sha256:8e8262ed07e730c2ad5ec19c7843d40dcef6b8f0abc54510394fa895c7d87ae4 size: 1998 [2024-11-22 12:21:22] [Pipeline] } [2024-11-22 12:21:22] [Pipeline] // stage [2024-11-22 12:21:22] [Pipeline] } [2024-11-22 12:21:22] [Pipeline] // node [2024-11-22 12:21:22] [Pipeline] End of Pipeline [2024-11-22 12:21:22] Finished: SUCCESS *** -----------构建koa-oass-024----------- 2024-11-22 12:20:38 create_build_image : succ, 2024-11-22 12:21:26 check_build_image : succ, , -----------服务koa-oass部署koa-oass-024----------- 2024-11-22 12:21:27 create_eks_virtual_service : succ, 2024-11-22 12:21:27 check_eks_virtual_service : process, DescribeVersion_user_error_Back-off restarting failed container, [service]:[Back-off restarting failed container,]
程序用PIL和moviepy做图片转视频的处理,但一调用到这部分功能服务就会崩掉重启,CPU和内存占用率都没超10%,请问可能是什么原因?应该如何解决? [图片]
云托管服务的内网域名是只有同环境的其他服务才能访问通吗,即便是处于和服务授权资源互通的同账号VPC下其他的云服务器CVM也调不通? 现在是我的云托管服务ping我的cvm内网IP能通,反过来就不通了
错误信息如下 [图片]
[图片] 求问如何解决?
https://developers.weixin.qq.com/miniprogram/dev/wxcloudservice/wxcloudrun/src/guide/debug/#%E4%BA%94%E3%80%81%E6%9C%8D%E5%8A%A1%E9%97%B4%E4%BA%92%E7%9B%B8%E8%B0%83%E7%94%A8 基于这个文档,操作了,LOCAL CONTAINERS还是没有文件显示。 看哪位有空,我可以付费咨询问题。
微信云托管上面的文件链接在手机浏览器上面为啥都是带风险提示的问题,谁能给我解答一下啊! 对象存储里面的链接都是风险链接了!这个问题怎么解决?谁来解决? 现在导致域名也跟着风险提示了!!!
想问问微信云托管部署SpringBoot项目如果用的是jdk21的话,[图片]官方示例Dockerfile中这个应该改成什么
对对象存储和静态资源储存放上网站后加载半天才加载出来如何提速 [图片]
微信小程序-云托管内通过redis镜像创建的redis服务,如何通过外网访问?目的是想在本地能够操作redis。
https://developers.weixin.qq.com/miniprogram/dev/wxcloudservice/wxcloudrun/src/guide/debug/
符串 nonce_strhttps://developers.weixin.qq.com/miniprogram/dev/wxcloudservice/wxcloudrun/src/development/pay/order/query.html 到底需不需要传随机字符串,例子中没有,但文档写必传,如果需要的话传什么值,是否需要和调用下单和JSAPI传入的值一致
手动上传的jar包,但是部署的时候没有jdk17版本的选项,请求支持,谢谢
云托管没有代码仓库吗?
请问下 小程序 使用 云托管,按照官方文档写了初始化,但偶尔还会出现 {"errCode":-1,"errMsg":"Cloud API isn't enabled, please call wx.cloud.init first\n请先调用 wx.cloud.init() 完成初始化后再调用其他云 API。"} 是什么原因
com.qcloud.cos.exception.CosServiceException: Access Denied. (Status Code: 403; Error Code: AccessDenied; Request ID: NjcxZTU5NTJfOWRlZDk4MWVfMTVhNjdfMzY3NjllYw==); Trace ID: OGVmYzZiMmQzYjA2OWNhODk0NTRkMTBiOWVmMDAxODc0OWRkZjk0ZDM1NmI1M2E2MTRlY2MzZDhmNmI5MWI1OTQyYWVlY2QwZTk2MDVmZDQ3MmI2Y2I4ZmI5ZmM4ODFjYWI2MDVkZDkxYjMwOTM4YTMyOWE4YmZkMDgyOGEyMGY=
一般是出现在点击分享在群内的小程序卡片时候出现的,但不是必现,偶现 可以确定的是,所有的请求,都会校验wx.cloud.ini()是否有执行,没有执行的话,就会执行这个wx.cloud.ini() 如果我的代码,没有执行这个wx.cloud.ini(),那就不是偶现了,而是必现了 比较奇怪,大神们看看,一般是啥原因?
上传 “index00.php” 0% 查看详情 {"error":{"Code":"AccessDenied","Message":"Request has expired","ServerTime":"2024-10-25T01:53:05Z","Resource":"/","RequestId":"NjcxYWZhMDFfOTc1NWI1MDlfMTI3ZjRfM2FmMzFkZQ==","TraceId":"OGVmYzZiMmQzYjA2OWNhODk0NTRkMTBiOWVmMDAxODc0OWRkZjk0ZDM1NmI1M2E2MTRlY2MzZDhmNmI5MWI1OTBjYzE2MjAxN2M1MzJiOTdkZjMxMDVlYTZjN2FiMmI0Zjc0NjVmMTk4YTYxNTdlYTljMGQ5Yzg3MjFiZmVkZWU="},"statusCode":403,"headers":{"content-length":"458","content-type":"application/xml","date":"Fri, 25 Oct 2024 01:53:05 GMT"}} 上传 “index00.php” 0% 查看详情 {"error":{"Code":"AccessDenied","Message":"Request has expired","ServerTime":"2024-10-25T01:50:37Z","Resource":"/","RequestId":"NjcxYWY5NmRfMjQ1MDE0MGJfZTY5OV82ZGVjNzJk","TraceId":"OGVmYzZiMmQzYjA2OWNhODk0NTRkMTBiOWVmMDAxODc0OWRkZjk0ZDM1NmI1M2E2MTRlY2MzZDhmNmI5MWI1OTBjYzE2MjAxN2M1MzJiOTdkZjMxMDVlYTZjN2FiMmI0Zjc0NjVmMTk4YTYxNTdlYTljMGQ5Yzg3MjFiZmVkZWU="},"statusCode":403,"headers":{"content-length":"454","content-type":"application/xml","date":"Fri, 25 Oct 2024 01:50:37 GMT"}}
从没用过云托管,想自己架设服务器或者购买云服务器,但是由于自身代码安全知识不足,没有专业的技术去保证自己服务和数据库的数据安全,因为要做的是属于电商类的项目,一旦用户信息泄露或用户数据丢失将带来不可控的损失,所以想问一下云托管功能是否能保证我的数据安全?能保证到什么程度?
此问题主要是因为流水线部署没有dockerfile的原因,将第一次部署后生成的dockerfile拷贝的自己的代码目录中即可