Always backup your database and files before updating. See the Backup & Restore guide.
Version Information
Check your current version in the CAD footer or inpackage.json:4:
package.json
Docker Installation Updates
Standard Update Process
-
Navigate to installation directory
-
Stop the running containers
-
Pull latest changes
-
Rebuild the containers
-
Start the containers
Database migrations run automatically on startup via
prisma migrate deploy in apps/api/package.json:7.Update with Environment Changes
If the new version requires environment variable changes:- Check the release notes for new environment variables
- Update your
.envfile with new required variables - Compare with
.env.exampleto ensure all variables are present - Restart containers to apply changes
Troubleshooting Docker Updates
Build fails with cache issues
Build fails with cache issues
Clear Docker build cache:
Database migration errors
Database migration errors
Check API container logs:Migrations are applied automatically by Prisma. If they fail, check for schema conflicts or manually run:
Containers won't start
Containers won't start
Check all container logs:Verify environment variables are set correctly:
Standalone Installation Updates
Standard Update Process
-
Navigate to installation directory
-
Stop the running processes
-
Pull latest changes
-
Install dependencies
-
Run database migrations
-
Build the application
-
Start the application
Quick Update Script
The package.json:7 includes afull-start script that automates most steps:
- Stashes local changes
- Pulls latest code
- Installs dependencies
- Copies environment files
- Builds the application
- Starts both API and client
Manual Migration Process
If you need more control over migrations:Version-Specific Updates
Major Version Updates
Major version updates (e.g., 1.x to 2.x) may require additional steps:- Read the migration guide in the release notes
- Check for breaking changes in configuration or database schema
- Test in a staging environment before updating production
- Backup everything before proceeding
Minor Version Updates
Minor versions (e.g., 1.80.x to 1.81.x) typically include:- New features
- Bug fixes
- Non-breaking changes
- Automatic database migrations
Patch Updates
Patch versions (e.g., 1.80.1 to 1.80.2) usually include:- Bug fixes
- Security patches
- No database changes
- Safe to update without migrations
Post-Update Verification
Check Application Health
-
Verify services are running
-
Check application logs
-
Test database connectivity
Verify Database Migrations
Rollback Procedures
Docker Rollback
-
Stop current containers
-
Checkout previous version
- Restore database backup See Backup & Restore guide.
-
Rebuild and start
Standalone Rollback
- Stop services
- Checkout previous version:
git checkout <commit-hash> - Restore database backup
- Rebuild:
pnpm install && pnpm run build - Start services
Update Best Practices
- Always backup first - Database and uploaded files
- Read release notes - Check for breaking changes and new requirements
- Test in staging - Validate updates in a non-production environment
- Update during low traffic - Minimize user disruption
- Monitor after update - Watch logs for errors or issues
- Keep dependencies updated - Ensure Node.js and PostgreSQL meet requirements
Automated Updates
For development or testing environments, you can create an update script:update.sh
Next Steps
- Backup & Restore - Regular backup procedures
- Troubleshooting - Common issues and solutions
- Environment Variables - Configuration reference