前端部署
SmartCall 前端管理界面通过 Nginx 提供静态文件服务,并反向代理后端 API。
1. nginx 配置
在前端项目根目录下找到apps/web-smart/nginx.conf文件,修改以下部分:
微服务部署把端口改为9000,单体应用部署把端口改为9999

2. 构建前端镜像
# 进入项目目录
cd smart-call-ui
# 安装依赖
pnpm install
pnpm run build
cd apps/web-smart
docker build -t smartaster-ui:1.0.0 .
3. 编辑服务器文件/app/smartaster/docker-compose.yml加入以下配置:
smart-ui:
image: "smartaster-ui:1.0.0"
hostname: "smartaster-ui"
container_name: "smartaster-ui"
privileged: true
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "80:80"
restart: always
4. 在目录/app/smartaster下,执行以下命令启动服务
docker-compose up -d
5. 执行以下命令可以查看服务是否启动成功
docker-compose ps
