当前位置: 首页 > news >正文

国外开源客服系统chathoot部署,使用教程

目录

一、系统版本要求:

二、部署步骤

2.1 安装docker 和docker-compose

2.2 准备docker-compose.yaml

2.3 初始化数据库

2.4 安装nginx

2.6 启动项目

三、使用教程


一、系统版本要求:

  • linux ubuntu 22.04+
  • 2核4G 40GB(或以上)
  • 公网ip一个
  • 端口白名单:80、443(0.0.0.0/0)

二、部署步骤

2.1 安装docker 和docker-compose

apt update && apt install docker.io -y
wget https://github.com/docker/compose/releases/download/v2.30.1/docker-compose-linux-x86_64
mv docker-compose-linux-x86_64 docker-compose && chmod +x ./docker-compose && mv ./docker-compose /usr/bin/

2.2 准备docker-compose.yaml

mkdir /data/chatwoot
vim /data/chatwoot/docker-compose.yaml

将下面配置文件复制到/docker-compose.yaml

version: '3'services:base: &baseimage: chatwoot:latestenv_file: .env ## Change this file for customized env variablesvolumes:- storage_data:/app/storagerails:<<: *basedepends_on:- postgres- redisports:- '127.0.0.1:3000:3000'environment:- NODE_ENV=production- RAILS_ENV=production- INSTALLATION_ENV=dockerentrypoint: docker/entrypoints/rails.shcommand: ['bundle', 'exec', 'rails', 's', '-p', '3000', '-b', '0.0.0.0']restart: alwayssidekiq:<<: *basedepends_on:- postgres- redisenvironment:- NODE_ENV=production- RAILS_ENV=production- INSTALLATION_ENV=dockercommand: ['bundle', 'exec', 'sidekiq', '-C', 'config/sidekiq.yml']restart: alwayspostgres:image: pgvector:pg16restart: alwaysports:- '0.0.0.0:5432:5432'volumes:- postgres_data:/var/lib/postgresql/dataenvironment:- POSTGRES_DB=chatwoot- POSTGRES_USER=postgres# Please provide your own password.- POSTGRES_PASSWORD=qishuo&_123redis:image: redis:alpinerestart: alwayscommand: ["sh", "-c", "redis-server --requirepass \"$REDIS_PASSWORD\""]env_file: .envvolumes:- redis_data:/dataports:- '127.0.0.1:6379:6379'volumes:storage_data:postgres_data:redis_data:

 如果国内下载失败,可以尝试使用阿里、清华源

docker-compose up -d

2.3 初始化数据库

注意,容器名可能不叫chatwoot-rails-1,docker ps查看容器名确认后执行

 docker-compose run --rm chatwoot-rails-1 bundle exec rails db:chatwoot_prepare

2.4 安装nginx

目的是暴露到外网

apt install nginx

配置下面的nginx文件,注意修改server_name xxxx 为自己的域名

vim /etc/nginx/conf.d/chatwoot.conf

server {server_name xxxx;# Point upstream to Chatwoot App Serverset $upstream 127.0.0.1:3000;# Nginx strips out underscore in headers by default# Chatwoot relies on underscore in headers for API# Make sure that the config is set to on.underscores_in_headers on;location /.well-known {alias /var/www/ssl-proof/chatwoot/.well-known;}location / {proxy_pass_header Authorization;proxy_pass http://$upstream;proxy_set_header Upgrade $http_upgrade;proxy_set_header Connection "upgrade";proxy_set_header Host $host;proxy_set_header X-Forwarded-Proto $scheme;proxy_set_header X-Forwarded-Ssl on; # Optionalproxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_http_version 1.1;proxy_buffering off;client_max_body_size 0;proxy_read_timeout 36000s;proxy_redirect off;}listen 80;
}

加载nginx配置

nginx -t && nginx -s reload

配置证书,最后一步需要填写你自己的域名

apt install certbot
apt-get install python3-certbot-nginx
mkdir -p /var/www/ssl-proof/chatwoot/.well-known
certbot --webroot -w /var/www/ssl-proof/chatwoot -d 你的域名 -i nginx

2.6 启动项目

访问域名 https://你的域名

三、使用教程

待更新

相关文章:

  • 网站开发常见bug百度网盘搜索引擎入口官网
  • 嘉兴做外贸网站比较好的公司2022年传销最新消息
  • 公司十大部门宁波seo外包服务
  • 青海网站建设优化网络营销和网络推广有什么区别
  • 新河镇网站制作搜资源的搜索引擎
  • 泉州哪里有搭建网站的公司在线建站平台
  • Python实例题:基于 Flask 的博客系统
  • 人工智能编程三大核心流程详解--机器学习、神经网络、NLP自然语言处理
  • K8s: Kubernetes
  • 权威认证!华宇TAS应用中间件荣获CCRC“中间件产品安全认证”
  • Beam2.61.0版本消费kafka重复问题排查
  • SQL SERVER存储过程
  • SQL重置自增
  • Solidity学习 - 认识Solidity合约结构
  • Windows命令连接符的安全风险分析与防御策略
  • [附源码+数据库+毕业论文+开题报告]基于Spring+MyBatis+MySQL+Maven+jsp实现的宠物领养管理系统,推荐!
  • 无人机关键算法分析 ( MPU6050 ,PID,滤波,四元数,欧拉角,IMU 姿态解算)
  • vue3中使用vue-grid-layout来实现可拖动的仪表盘面板
  • 深度学习在智能物流中的创新应用与未来趋势
  • 在统信UOS(Linux)中构建SQLite3桌面应用笔记
  • C++之string类的实现代码及其详解(上)
  • 0 数学习题本
  • 【stm32】HAL库开发——Cube配置基本定时器
  • Llama 3 + Qwen2双模型实战:单张3090构建企业级多模态知识库(2025精解版)
  • 关于 ARM64 汇编:调用流程与栈帧结构解析
  • Jenkins与Kubernetes深度整合实践