Running Statamic on Ploi Cloud
Running Statamic on Ploi Cloud
When you deploy a Statamic application on Ploi Cloud, the platform automatically configures your application with specialized settings designed for Statamic's unique flat-file architecture. This integration ensures your content, assets, and user uploads persist across deployments while maintaining Git-based version control for your code.
Creating a Statamic application
To create a Statamic application:
-
Click "Create application" in your team dashboard
-
Select your Git repository containing your Statamic project
-
Choose "Statamic" as your framework type
-
Select your Statamic version:
- Statamic 5.x (Latest) - Runs on PHP 8.2
- Statamic 4.x - Runs on PHP 8.1
- Statamic 3.x (Legacy) - Runs on PHP 8.0
-
Choose your deployment region
-
Configure any build commands if needed
Automatic configuration
When you create a Statamic application, Ploi Cloud automatically:
- Provisions a 20GB persistent volume for your application
- Configures Git integration for content synchronization
- Sets up the correct PHP version based on your Statamic version
- Installs required PHP extensions (gd, exif, intl, zip, opcache)
- Enables Statamic Pro features
Persistent storage
Your Statamic application includes persistent storage that preserves user-generated content across deployments. The following directories are automatically mounted to persistent storage:
- /public/assets - User uploaded assets
- /public/images - Image uploads
- /public/files - File uploads
- /storage/forms - Form submission data
All other content (entries, collections, taxonomies, globals, navigation, blueprints) remains in your Git repository, allowing you to version control your content structure while preserving user uploads.
Git integration
Statamic applications on Ploi Cloud come with Git automation pre-configured. This means:
- Content changes made in the control panel are automatically committed to Git
- Changes are pushed to your repository after a 5-second delay
- Your repository URL is automatically configured if you've connected a Git provider
- Git operations run in a safe directory configuration
Adding services
While Statamic doesn't require a database for content storage, you can add services if your application needs them:
- Required: Redis for sessions
- Database services (MySQL, PostgreSQL, MongoDB) for custom application data
- Additional services can be added after creating your application
Environment configuration
Your Statamic application automatically receives these environment variables:
STATAMIC_PRO_ENABLED=true
- Enables Statamic Pro featuresSTATAMIC_GIT_ENABLED=true
- Enables Git integrationSTATAMIC_GIT_AUTOMATIC=true
- Enables automatic Git commitsSTATAMIC_GIT_PUSH=true
- Enables automatic Git pushesSTATAMIC_GIT_DISPATCH_DELAY=5
- Sets the delay before Git operationsSTATAMIC_GIT_REMOTE
- Your authenticated Git repository URL
Best practices
To get the most out of running Statamic on Ploi Cloud:
- Keep your content files in Git for version control and collaboration
- Use the persistent storage for user uploads and generated assets
- Configure your
.gitignore
to exclude directories mounted to persistent storage - Use environment variables for sensitive configuration
- Enable build commands if your Statamic site uses a frontend build process