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 6.x (Latest) - Runs on PHP 8.4
- Statamic 5.x - 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:
- Configures Git integration for content synchronization (enabled by default)
- Sets up the correct PHP version based on your Statamic version
- Installs required PHP extensions (gd, exif, intl, zip, opcache)
- Enables Statamic Pro features
- Pre-creates a
STATAMIC_LICENSEenvironment variable for your Pro license key - Provisions persistent storage (8GB total) when you opt out of Git integration
Persistent storage
By default, Statamic applications use Git integration mode and do not require persistent volumes. If you disable Git integration during creation, your application will instead use persistent storage to preserve user-generated content across deployments. The following directories are automatically mounted to persistent storage (2GB each, 8GB total):
- /public/assets - User uploaded assets (2GB)
- /public/images - Image uploads (2GB)
- /public/files - File uploads (2GB)
- /storage/forms - Form submission data (2GB)
You can resize these volumes from the application's Storage tab after deployment if you need more space.
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_LICENSE- Empty by default; add your Statamic Pro license key hereSTATAMIC_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
.gitignoreto exclude directories mounted to persistent storage - Use environment variables for sensitive configuration
- Enable build commands if your Statamic site uses a frontend build process