Deployment Strategies
- Single Workspace
- Multi-Workspace
- Multi-Instance
Best for: Basic applications with minimal complexity, such as simple prompting agentsIn this approach, you use a single workspace for both development and production:
- Development: Create and test your application directly in the workspace
- Production: Once tested, the same workspace serves as the production environment
- Version Control: Use versioning to save stable points for potential rollback
- Simplest deployment approach
- No need to migrate between workspaces
- Quick iteration and updates
- Limited separation between development and production
- Higher risk of disruptive changes affecting live users
- Best suited for applications with low complexity and minimal regulatory constraints
Versioning Your Application
Workspaces can be synchronized with Git repositories to version your application, enabling push/pull workflows, collaboration, and rollback capabilities. For complete documentation on repository configuration, authentication methods, push/pull operations, merge conflict handling, and bulk operations, see the dedicated Versioning page.API deployment
Here is a small example script using archive export/import APIs to update a workspace from another :CI/CD deployment
CI-based deployment enables more complex scenarios, especially useful for multi-instance environments where you need to promote workspaces from a development/sandbox instance to production instances. The general approach is:- Push workspaces to a Git repository from the source environment (bulk push via API)
- Build a Docker image embedding those workspaces into the
prismeai-workspacesservice - Deploy the image to the target environment, where workspaces are automatically imported at startup
However, the scenario described here have the following advantages :
- CI/CD enable additional security and quality guardrails during the upgrade process
- The dest environment do not need any network access to the source environement git, and can be upgraded / roll-backed at any time even if the git is not available
Prerequisites
Platform repository on the source environment
Configure a platform repository on your source environment (e.g. sandbox) so that all workspaces can be pushed to a shared Git repository:Workspace groups
Define workspace groups to organize which workspaces should be included in your releases:Step 1: Bulk push workspaces to Git
Use the bulk push API to export all workspace groups to the platform repository. This is typically the first stage of your CI/CD pipeline:?sse=true parameter enables Server-Sent Events for real-time progress tracking, which is recommended for CI pipelines to avoid HTTP timeouts on large deployments.
Step 2: Build a Docker image with embedded workspaces
Once workspaces are pushed to Git, build a customprismeai-workspaces Docker image that embeds them. This uses a Dockerfile that:
- Clones the workspaces repository
- Runs a security scan (e.g. TruffleHog) to detect leaked secrets
- Copies the workspace files into the image
- Configures a filesystem-type platform repository pointing to the embedded files
/www/workspaces directory as a read-only platform repository named “release”. This allows the target environment to use the standard bulk import mechanism to import workspaces from the Docker image itself, without needing Git credentials.
The CI job to build this image:
Step 3: Deploy and import on the target environment
Deploy the custom image to your target environment (e.g. production). On startup, workspaces can be automatically imported using theSTARTUP_IMPORT_* environment variables:
Summary
The complete CI/CD flow looks like this:Environment-Specific Configuration
Manage differences between environments:Use Workspace Secrets
Store environment-specific values as secrets:Access these values in your application using:
Deployment Best Practices
Version Everything
Maintain complete history of your application:
- Commit changes frequently with clear messages
- Use branches for feature development
- Tag important releases (e.g., v1.0.0)
- Document significant version changes
- Never work directly in production
Test Before Deployment
Validate thoroughly before moving to production:
- Test in development environment first
- Verify integrations with external systems
- Test with realistic data sets
- Include user acceptance testing
- Conduct security testing
Controlled Deployment
Implement safeguards around deployment:
- Use approval workflows for production changes
- Deploy during low-traffic periods
- Implement monitoring during deployment
- Prepare rollback procedures
- Document deployment steps
Environment Isolation
Maintain clear boundaries between environments:
- Use separate API keys for each environment
- Configure different external service endpoints
- Apply appropriate security controls by environment
- Use visual indicators to distinguish environments
- Limit production access to necessary personnel
Troubleshooting Deployments
Infrastructure issues
Infrastructure issues
First check that your infrastructure is properly configured and running with readiness API.
Import/Pull Failures
Import/Pull Failures
Common causes and solutions for import problems:Issue: Slug ConflictsSolution: Ensure unique slugs across workspaces or exclude index file from import.
- For Platform bulk imports, check the detailed errors list in workspaces.bulkImport.completed event.
- For bulk archive imports, check the same detailed errors list in prismeai-workspaces container logs.
- Individual workspace import errors an also be checked in the workspaces.imported event emitted in their activity feed.
Rollback Procedures
Rollback Procedures
How to revert to a previous state:Platform rollback:
- Identify the stable version tag
- Revert prismeai images to that tag
- Open Platform workspace and pull again all 3 native goups one after another : base1, base2, extended.
- Open the workspace activity feed
- Filter events on type
workspaces.versions.published - Use the native “Rollback” UI button to roll back to the desired version
- Maintain archives of known-good workspace states
- Import the last stable archive if issues occur
Next Steps
RBAC
Configure role-based access control across environments
Integrations
Connect your applications to external systems
Testing & Debugging
Learn how to thoroughly test applications before deployment