Skip to main content

Deploy with Docker Compose

Prerequisites

info

Before installing Xpert, make sure your machine meets the following minimum system requirements:

  • CPU >= 2 Core
  • RAM >= 4 GiB

Clone Xpert

git clone https://github.com/xpert-ai/xpert.git
cd xpert

Starting Xpert

  1. Navigate to the Docker directory in the Xpert source code
cd docker
  1. Copy the environment configuration file
cp .env.example .env
  1. Start the Docker containers
docker compose up -d

After executing the command, you should see output similar to the following, showing the status and port mappings of all containers:

 ✔ Network xpert-ai_default         Created                  0.0s 
✔ Container xpert-ai-db-1 Started 0.0s
✔ Container xpert-ai-redis-1 Started 0.0s
✔ Container xpert-ai-api-1 Started 0.0s
✔ Container xpert-ai-webapp-1 Started 0.0s

Finally, check if all containers are running successfully:

docker compose ps

This includes 2 core services: api / webapp, and 2 dependent components: db / redis .

NAME                IMAGE                                       COMMAND                  SERVICE   CREATED         STATUS                   PORTS
xpert-ai-api-1 ghcr.io/xpert-ai/xpert-api:latest "docker-entrypoint.s…" api 4 minutes ago Up 4 minutes 0.0.0.0:3000->3000/tcp
xpert-ai-db-1 pgvector/pgvector:pg12 "docker-entrypoint.s…" db 4 minutes ago Up 4 minutes (healthy) 5432/tcp
xpert-ai-redis-1 redis/redis-stack:latest "sh -c 'redis-server…" redis 4 minutes ago Up 4 minutes 6379/tcp, 8001/tcp
xpert-ai-webapp-1 ghcr.io/xpert-ai/xpert-webapp:latest "./entrypoint.compos…" webapp 4 minutes ago Up 4 minutes 0.0.0.0:80->80/tcp, 443/tcp

With BI Services

If you need to enable multidimensional modeling capabilities for data analysis, please start the Docker containers using the bi profile

docker compose --profile bi up -d

Upgrade

Enter the docker directory of the xpert source code and execute the following commands:

cd xpert/docker
docker compose down
git pull origin main
docker compose pull
docker compose up -d

Sync Environment Variable Configuration (Important)

  • If the .env.example file has been updated, be sure to modify your local .env file accordingly.
  • Check and modify the configuration items in the .env file as needed to ensure they match your actual environment. You may need to add any new variables from .env.example to your .env file, and update any values that have changed.

Access Xpert AI

Access initialization page to set up the admin account and tenant:

# Local environment
http://localhost/

# Server environment
http://your_server_ip/

Change the base url in .env file point to server when you deploy Xpert AI in server environment.

API_BASE_URL=//your_server_ip:3000
CLIENT_BASE_URL=//your_server_ip

Customize

Edit the environment variable values in your .env file directly. Then, restart Xpert with:

docker compose down
docker compose up -d

Read More

If you have any questions, please refer to FAQs.