System Upgrade Guide
Version Compatibility
Important
Direct upgrade from ThingsPanel v0.5.4 to v1.0.0 is NOT supported. A fresh deployment is required.
Docker Deployment Upgrade Guide
Pre-upgrade Preparation
-
Data Backup
- Backup Database
- Backup Configuration Files
- Backup Custom Plugins and Extensions
-
Environment Check
- Confirm sufficient system resources
- Verify storage space
- Check status of existing services
Upgrade Methods
You can choose one of the following two upgrade methods:
- Partial Container Upgrade (Update specific services only)
- Full System Upgrade (Update all components)
Partial Container Upgrade Process
1. Container and Volume Mapping
Frontend Service: thingspanel-vue:nginx
MQTT Service: thingspanel-gmqtt:gmqtt
Backend Service: thingspanel-go:go
2. Upgrade Steps
-
Update Source Code
cd thingspanel-docker
git pull -
Stop and Clean Target Containers
# Stop container
docker stop <ContainerID>
# Remove container
docker rm <ContainerID>
# Remove image
docker rmi <ImageID> -
Clean Volumes
# Prune unused volumes
docker volume prune
# List existing volumes
docker volume ls
# Remove specific volumes (if needed)
docker volume rm thingspanel-docker_nginx
docker volume rm thingspanel-docker_gmqtt
docker volume rm thingspanel-docker_go -
Redeploy Services
docker-compose -f docker-compose.yml up
tip
If the new version uses the same image tag, ensure you delete the local image and pull again to get the latest build.
Full System Upgrade Process
-
Preparation
- Compare the new and old
docker-compose.ymlfiles to confirm services needing updates. - Update source code to the target version.
git pull - Compare the new and old
-
Stop Existing Services
docker-compose down -
Start New Version
docker-compose -f docker-compose.yml up -d
Configuration Updates
To modify configurations in volumes:
-
Find Volume Location
# List all volumes
docker volume ls
# Inspect specific volume
docker volume inspect <VolumeName> -
Modify Configuration
- Directly edit the config files in the volume directory.
- Note: Applications generally prioritize configurations from Environment Variables.
Precautions
- Always backup important data before upgrading.
- It is recommended to test the upgrade in a staging environment first.
- Preserve custom configurations during the upgrade.
- Rollback to the backup version if issues occur.
Source Code Deployment Upgrade
For source code deployment environments:
-
Update Source Code
git pull origin <target-version> -
Recompile
-
Restart Services