Skip to main content

Docker Compose deployment

Recommended minimum configuration 1 core 2G

If there is only 1 core 1G? Please refer to my blog: Linux small resource server experience summary expand memory space by swapping memory

Memory usage for reference:

Pre-environment

Docker / Docker Compose

First you need to make sure you have a Docker / Docker Compose environment

The installation method can refer to: Install the docker environment

Pull Image

You can pull the compiled image from public image or manually compile from source code

Using the compiled image can compile without spending enough computer resources, which is very friendly to servers with small resource configurations. In addition, compared to source code compilation, the code of the public image is more stable.

Use cli Please make sure you already have a node environment on your server (node version 16+ is recommended) If you don't know about node, you can use Manually install from public image

Use the command line tool tailchat-cli to pull/update the image with one click:

npx tailchat-cli docker update

Startup project

npx tailchat-cli docker init

Executing this command will ask you some configuration-related questions in an interactive manner (as shown in the figure below), and the configuration file will be automatically generated after filling it out

After completing the configuration, use docker-compose to start the Tailchat application with one click:

# Make sure the configuration files (docker-compose.yml and docker-compose.env) are in the current directory
# Execute the following command to start with one key
docker compose up -d

Visit: http://<server ip>:11000 to open tailchat.

Note that some cloud services may need to manually open firewall ports.

Some environment variables are provided in the docker-compose.env file for configuration.

The docker-compose.yml configuration of tailchat provides the following configuration by default:

  • mongodb: Persistent Database
  • redis: KV database and message transport service
  • minio: Distributed file service

The persistent files (database, file storage) are managed uniformly through docker volume:

docker volume ls | grep "tailchat-server"
info

Complete environment variables can be queried Environment Variables