Upgrading
ReArch follows a rolling update strategy. The Docker Compose files configure update policies that replace service replicas one at a time, with automatic rollback on failure.
Docker Swarm Update
Section titled “Docker Swarm Update”To update all ReArch services to the latest version:
# Update each service individuallydocker service update --image ghcr.io/rearch-engineer/rearch-frontend:latest rearch_frontenddocker service update --image ghcr.io/rearch-engineer/rearch-backend:latest rearch_backenddocker service update --image ghcr.io/rearch-engineer/rearch-mcp-proxy:latest rearch_mcp-proxyOr redeploy the entire stack (this also picks up Docker Compose file changes):
docker stack deploy -c docker-compose-traefik.yml rearchBefore Upgrading
Section titled “Before Upgrading”- Check the Changelog for breaking changes or migration steps.
- Back up MongoDB —
mongodumptherearchdatabase. - Back up Keycloak — Export the realm or back up the PostgreSQL database.
Rollback
Section titled “Rollback”If an update causes issues, Docker Swarm’s built-in rollback reverts to the previous image:
docker service rollback rearch_backenddocker service rollback rearch_frontenddocker service rollback rearch_mcp-proxyDatabase Migrations
Section titled “Database Migrations”ReArch does not use a formal migration system. Schema changes are applied automatically by the backend on startup via Mongoose model definitions. In rare cases where a manual migration is needed, it will be documented in the changelog with specific instructions.