Comments (2)
Hi~
「我看这边是基于docker镜像,不知道是否可以基于非docker的部署方式」
支持,如果你想在宿主机上直接部署,请运行:
$ npm install
# 调试
$ npm run dev
# 部署
$ npm run build
$ npm run start
然后将您宿主机的 3000 端口代理到域名即可。
「部署是否还依赖docker外的一些环境,例如用户提交的信息存储」
是的,目前客服模块,依赖四个环境变量,分别是:
JUZI_API_TOKEN=秒回对应的 API TOKEN,见文档:https://docs.juzibot.com/instant-reply-legacy/
JUZI_HELLO_MSG="我是句子互动的张思文,请添加我的企业微信"
FEISHU_BOT_URL=飞书机器人 webhook 请求地址
JUZI_API_URL="https://ex-api.botorange.com/addFriend/send"
你可以将这些变量写入项目根目录中,如果你不需要这个模块,或者你有其他的客服通知方式,请修改 src/pages/api/contact.ts
中对应的接口。
「如果往阿里云部署,那部分脚本是」
script
目录下目前有两个脚本,一个是 CI 调用的打包容器的脚本 build_docker_ci.sh
,另一个是前端工程师手动调用的 upload_to_cdn.sh
,它的作用是将 public/_images
下的静态文件(主要是图片)上传至 CDN,然后前端工程师在 IDE 中将 /_images/
替换为 CDN 的地址 https://cdn-official-website.juzibot.com/images/
,实现静态资源的加速。
欢迎 fork,目前我们的 CI/CD 是基于 Github Action 的,你可以参考。
Next.js 自带了静态资源管理功能,如果不需要使用 CDN,你可以将现有代码中的 https://cdn-official-website.juzibot.com/images/
全部替换为 /_images/
,使用方法详见 Next.js 相关文档。
目前没有向阿里云部署的脚本,你可以自行实现。
from homepage.
@DreamerLark 我先关闭这个 issue 啦,如果有任何问题请留言
from homepage.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homepage.