How to Configure an Easily Expandable Instant Chat Application — Tailchat
Introduction:
Tailchat—An open-source and easily expandable instant chat application, making communication more free, flexible, and fun
For personal users, Tailchat perfectly adapts to the following scenarios:
- Playing with Friends: Simply create a group, and divide different topics through multiple channels; you can also use a web panel to share your favorite webpages.
- Building Your Fan Circle: Use bots to subscribe and forward information to the chat panel, gather fans together, avoid creating countless QQ/WeChat groups, and multiple channels enable multiple topics to be generated together.
- Privacy in Your Hands: If privacy is of great concern to you, Tailchat allows you to deploy it yourself, and everything can be controlled in your hands.
For business users, Tailchat also has rich features:
- Panelized Design: Fully meets the customization needs of the enterprise.
- Plug-in Architecture: Development based on the core becomes extremely convenient.
- Self-deployment Implementation: Protects corporate value, giving you peace of mind in use.
- Open Source Code: Transparency of the code makes auditing simple.
Step One: Update the Sources
#Ubuntu/Debian
apt update -y && apt upgrade -y
#Centos
yum update -y && yum upgrade -y
Step Two: Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh && sh ./get-docker.sh
Step Three: Pull the Image
docker pull moonrailgun/tailchat # Pull tailchat image from the public image library
docker tag moonrailgun/tailchat tailchat # Rename the downloaded image as tailchat (keep consistent with source code compilation; if not renamed, source code compilation process will be followed)
Step Four: Download Necessary Files
mkdir tailchat && cd tailchat
wget https://raw.githubusercontent.com/msgbyte/tailchat/master/docker-compose.yml
wget https://raw.githubusercontent.com/msgbyte/tailchat/master/docker-compose.env
wget https://raw.githubusercontent.com/msgbyte/tailchat/master/docker/admin.yml
Modify the docker-compose.env
file settings, suggesting changes to the following content:
API_URL
External accessible URL address, used for file service access, can be a domain name or an IP If images cannot be displayed properly, this variable is not setSECRET
Server encryption key, used to generate Tokens. Default istailchat
SMTP_SENDER
Send email verification information, format asxxx@example.com
or"YourName" xxx@example.com
SMTP_URI
SMTP email service address, format as:<protocol>://<username>:<password>@<host>:<port>/<other-info>
ADMIN_USER
Administrator account nameADMIN_PASS
Administrator account password
Step Five: Launch the Application
docker compose -f docker-compose.yml -f admin.yml up -d
Access: http://<server ip>:11000
to open Tailchat
Access: http://<server ip>:11000/admin
to open Tailchat admin panel
Note:
Below are all the current environment variables, which can be added or modified directly in docker-compose.env
. After modifying, run the following command to clear the cache and restart the container
Variable Name | Default Value | Description |
---|---|---|
PORT | 11000 | Gateway service port number |
SECRET | tailchat | Encryption key, used for JWT |
STATIC_HOST | "{BACKEND}" | Externally accessible static service host, used for file service access; defaults to dynamically inferred server address based on front-end request; modify if you wish to store in third-party OSS |
STATIC_URL | "{BACKEND}/static/" | Externally accessible full static service URL prefix, used for file service access; defaults to dynamically inferred server address based on front-end request; modify if stored in third-party OSS; if this variable is set, the above STATIC_HOST value is invalid |
API_URL | http://127.0.0.1:11000 | Externally accessible URL address, used for open platform issuer issuance or as a fallback for file service |
MONGO_URL | - | Database service address |
REDIS_URL | - | Redis service address |
MINIO_URL | - | File service address (minio) |
MINIO_USER | - | File service username |
MINIO_PASS | - | File service password |
MINIO_BUCKET_NAME | tailchat | File service bucket name |
MINIO_PATH_STYLE | "Path" | Whether to use path-style S3 communication format, Path for Path Style , VirtualHosted for Virtual hosted style |
SMTP_SENDER | - | Mail service sender (Example: "Tailchat" example@163.com ) |
SMTP_URI | - | Mail service connection address (Example: smtp://username:password@smtp.example.com/?pool=true ) |
FILE_LIMIT | 1048576 | File/image upload size limit, default is 1m, please enter a number (Unit: bytes) |
EMAIL_VERIFY | - | Enable email verification, if "1" or "true" then email verification control is added during registration |
DISABLE_LOGGER | - | Disable log output, if "1" or "true" log is closed during operation |
DISABLE_USER_REGISTER | - | Disable user registration function, if "1" or "true" this function is closed |
DISABLE_GUEST_LOGIN | - | Disable user guest login function, if "1" or "true" this function is closed |
DISABLE_CREATE_GROUP | - | Disable user group creation function, if "1" or "true" this function is closed |
DISABLE_PLUGIN_STORE | - | Hide user plugin center function, if "1" or "true" this function is closed |
DISABLE_ADD_FRIEND | - | Hide user add friend function, if "1" or "true" this function is closed |
docker-compose down --rmi all
docker compose -f docker-compose.yml -f admin.yml up -d
Original link:https://enblog.fuyiran.link/Technology/13.html
Copyright: All posts on this blog, unless otherwise stated, are published using theCC BY-NC-SA 4.0 license agreement. Please indicate the source for reprinting Fu Speaking (enblog.fuyiran.link)