2.5 KiB
2.5 KiB
Quick Deployment Guide with Docker Compose
This guide explains how to quickly deploy Xboard using Docker Compose. By default, it uses SQLite database, eliminating the need for a separate MySQL installation.
1. Environment Preparation
Install Docker:
curl -sSL https://get.docker.com | bash
# For CentOS systems, also run:
systemctl enable docker
systemctl start docker
2. Deployment Steps
-
Clone the
composebranch (it shipscompose.sample.yamland the othercompose.*.sample.yamlvariants):git clone -b compose --depth 1 https://github.com/cedar2025/Xboard cd Xboard cp compose.sample.yaml compose.yaml -
Install database:
- Quick installation (Recommended for beginners)
docker compose run -it --rm \
-e ENABLE_SQLITE=true \
-e ENABLE_REDIS=true \
-e ADMIN_ACCOUNT=admin@demo.com \
xboard php artisan xboard:install
- Custom configuration installation (Advanced users)
docker compose run -it --rm xboard php artisan xboard:install
Please save the admin dashboard URL, username, and password shown after installation The repository ships four compose templates in the
composebranch — pick the one matching your setup, copy it tocompose.yaml, then run the install command:
File Network When to use compose.sample.yamlbridge + ports 7001:7001bare docker, custom reverse proxy, aaPanel + Docker (default) compose.host.sample.yamlnetwork_mode: hostaaPanel native (openresty on host) compose.1panel.sample.yamlbridge + external 1panel-network1Panel users (so the container can reach 1Panel-managed MySQL/Redis) compose.split.sample.yamlmulti-container (web/horizon/ws-server/redis split) K8s migration, advanced scaling The local
compose.yamlis gitignored so your edits survivegit pullwhen you do clone the repo.
- Start services:
docker compose up -d
- Access the site:
- Default port: 7001
- Website URL: http://your-server-ip:7001
3. Version Updates
cd Xboard
docker compose pull && docker compose up -d
4. Version Rollback
- Modify the version number in
docker-compose.yamlto the version you want to roll back to - Execute:
docker compose up -d
Important Notes
- If you need to use MySQL, please install it separately and redeploy
- Code changes require service restart to take effect
- You can configure Nginx reverse proxy to use port 80