赞
踩
官网: https://tailchat.msgbyte.com/
作者:https://www.moonrailgun.com/about/
GitHub : https://github.com/msgbyte/tailchat
TailChat 是一款插件化易拓展的开源 IM 应用。可拓展架构赋予 Tailchat 无限可能性。前端微内核架构 + 后端微服务架构。使得 Tailchat 能够驾驭任何定制化 / 私有化的场景。面向企业与私域用户打造,高度自由的群组管理与定制化的面板展示可以让私域主能够更好的展示自己的作品,管理用户,打造自己的品牌与圈子。
参考:https://blog.laoda.de/archives/docker-compose-install-tailchat
个人用户
如果希望和朋友一起玩
如果希望聚集自己的粉丝圈
如果对于自己的隐私非常看中
企业用户
面板化设计满足企业自定义化设计需求
插件化架构可以方便基于核心进行二次开发
自部署的实现可以让企业价值得到保护,让企业安心
开源代码方便审查
# 高版本 Docker 安装
curl -fsSL https://get.docker.com/ | sh
# 关闭防火墙
systemctl disable --now firewalld
setenforce 0
# 启用 Docker
systemctl enable --now docker
echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
systemctl restart network
sysctl net.ipv4.ip_forward
curl -L https://github.com/docker/compose/releases/download/v2.2.2/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose -v
mkdir -p /docker/tailchat
cd /docker/tailchat
vim docker-compose.yml
version: "3.3"
services:
# 应用网关
service-gateway:
build:
context: .
image: tailchat
restart: unless-stopped
env_file: docker-compose.env
environment:
SERVICES: core/gateway
PORT: 3000
depends_on:
- mongo
- redis
labels:
- "traefik.enable=true"
- "traefik.http.routers.api-gw.rule=PathPrefix(`/`)"
- "traefik.http.services.api-gw.loadbalancer.server.port=3000"
networks:
- internal
# 用户服务
service-user:
build:
context: .
image: tailchat
restart: unless-stopped
env_file: docker-compose.env
environment:
SERVICES: core/user/*
depends_on:
- mongo
- redis
networks:
- internal
# 群组服务
service-group:
build:
context: .
image: tailchat
restart: unless-stopped
env_file: docker-compose.env
environment:
SERVICES: core/group/*
depends_on:
- mongo
- redis
networks:
- internal
# 聊天服务
service-chat:
build:
context: .
image: tailchat
restart: unless-stopped
env_file: docker-compose.env
environment:
SERVICES: core/chat/*
depends_on:
- mongo
- redis
networks:
- internal
# 文件服务 / 插件注册中心 / 配置服务
service-file:
build:
context: .
image: tailchat
restart: unless-stopped
env_file: docker-compose.env
environment:
SERVICES: core/file,core/plugin/registry,core/config
depends_on:
- mongo
- redis
- minio
networks:
- internal
service-openapi:
build:
context: .
image: tailchat
restart: unless-stopped
env_file: docker-compose.env
environment:
SERVICES: openapi/app,openapi/oidc/oidc
OPENAPI_PORT: 3003
OPENAPI_UNDER_PROXY: "true"
depends_on:
- mongo
- redis
- minio
labels:
- "traefik.enable=true"
- "traefik.http.routers.openapi-oidc.rule=PathPrefix(`/open`)"
- "traefik.http.services.openapi-oidc.loadbalancer.server.port=3003"
networks:
- internal
# 插件服务(所有插件)
service-all-plugins:
build:
context: .
image: tailchat
restart: unless-stopped
env_file: docker-compose.env
environment:
SERVICEDIR: plugins
depends_on:
- mongo
- redis
- minio
networks:
- internal
# 数据库
mongo:
image: mongo:4
restart: on-failure
volumes:
- ./data:/data/db
networks:
- internal
# 数据缓存与中转通讯
redis:
image: redis:alpine
restart: on-failure
networks:
- internal
# 存储服务
minio:
image: minio/minio
restart: on-failure
networks:
- internal
environment:
MINIO_ROOT_USER: tailchat
MINIO_ROOT_PASSWORD: P@ssw0rd123456
volumes:
- ./storage:/data
command: minio server /data --console-address ":9001"
# 路由转发
traefik:
image: traefik:v2.1
restart: unless-stopped
command:
- "--api.insecure=true" # Don't do that in production!
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entryPoints.web.address=:80"
- "--entryPoints.web.forwardedHeaders.insecure" # Not good
ports:
- 8080:80 # 8080 可以改成自己服务器上没有被占用的端口
- 127.0.0.1:11001:8080 # 11001 同上
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- internal
- default
networks:
internal:
name: tailchat-internal
vim docker-compose.env
LOGGER=true
LOGLEVEL=info
SERVICEDIR=services
TRANSPORTER=redis://redis:6379
CACHER=redis://redis:6379
REDIS_URL=redis://redis:6379
MONGO_URL=mongodb://mongo/tailchat
SECRET=P@ssw0rd123456 # 改成自己的密钥
# file
API_URL=http://192.168.80.8 # 改成自己的网站
# minio
MINIO_URL=minio:9000
MINIO_USER=tailchat
MINIO_PASS=P@ssw0rd123456
# SMTP
SMTP_SENDER=
SMTP_URI=
# metrics
PROMETHEUS=1
docker pull moonrailgun/tailchat
docker tag moonrailgun/tailchat tailchat # 修改 tag 以让配置文件能够识别
cd /docker/tailchat # 确保来到 docker-compose 文件所在的文件夹下
# 确保配置文件 ( docker-compose.yml 和 docker-compose.env ) 在当前目录下
# 执行如下命令一键启动
docker-compose up -d
http://服务器IP地址:8080
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。