michtio/craftcms-claude-skills / skills/craft-fortrabbit
craft-fortrabbit
Verifiedfortrabbit (fortrabbit.com) — managed PHP hosting with a Craft CMS software template. Covers git push-to-deploy through the fortrabbit GitHub App, the build and post-deploy commands of the Craft template (migrate/all, project-config/apply, clear-caches/all), the merge deployment strategy with the /config/project replace pattern, the deploy file (.fortrabbit/deploy.yml) and its replace-by-default trap, the CRAFT_* ENV vars mapped from FORTRABBIT_DB_* platform variables, production settings (dev mode, admin changes, updates off), the persistent storage for asset volumes and rsync sync, MySQL over SSH and an SSH tunnel, the Craft queue and image transforms in a worker job, crons, platform limits (no root, no sendmail, heavy binaries in jobs only), and DDEV local development.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 10.9 KB |
| references/asset-storage.md | markdown | 4.2 KB |
| references/database.md | markdown | 4.3 KB |
| references/deploy-and-environments.md | markdown | 11.9 KB |
| references/limitations.md | markdown | 6.0 KB |
| references/local-dev.md | markdown | 3.3 KB |
references/asset-storage.md
View on GitHub# Asset Storage — Persistent Volumes and Sync
fortrabbit's storage is a **persistent** file system: it holds the deployed code and runtime data such as uploads, transforms and cache files, and keeps them across deployments and restarts. Craft's local filesystems work as on a single server. Uploads never enter git, so they move between local and remote with rsync or SFTP.
## Documentation
- Craft assets: https://docs.fortrabbit.com/guides/craft-cms/assets
- Storage component: https://docs.fortrabbit.com/platform/components/storage
- Deployment strategy: https://docs.fortrabbit.com/platform/deployment/strategy
- Exclude patterns: https://docs.fortrabbit.com/platform/deployment/exclude-patterns
- SFTP: https://docs.fortrabbit.com/platform/code-access/sftp
- Craft assets docs: https://craftcms.com/docs/5.x/reference/element-types/assets.html
## Local volumes
The Craft template deploys with the **merge** strategy: files on the environment that are not in the build stay. A local volume such as `web/uploads` survives every deployment without further setup.
With the **replace** strategy (or a deploy file without `strategy`), add every volume path to the exclude patterns, or it is deleted on the next deployment:
```yaml
# .fortrabbit/deploy.yml
distribution:
strategy: replace
excludePatterns:
- /web/uploads
```
Keep volume folders out of git. Craft adds a `.gitignore` when it creates a local filesystem folder; for a folder that existed before, add one by hand:
```gitignore
*
!.gitignore
```
Find the volume paths of a project:
```sh
grep -rn "path\|basePath" config/project/fs config/project/volumes 2>/dev/null
```
## Sync with rsync
rsync copies only changed files. SSH logs in at `/data/www`, the code folder, so remote paths are relative to it:
```sh
# down: fortrabbit → local
rsync -avz <env>@ssh.<region>.frbit.app:web/uploads/ ./web/uploads/
# up: local → fortrabbit, dry run first
rsync -avzn ./web/uploads/ <env>@ssh.<region>.frbit.app:web/uploads/
rsync -avz ./web/uploads/ <env>@ssh.<region>.frbit.app:web/uploads/
```
- Trailing slashes matter: `dir/` syncs the contents. Keep both sides the same shape.
- `--delete` removes files on the target that aren't on the source. Dry-run it first.
- Never sync `.env`, `.git/`, `node_modules/` or `storage/runtime/`.
After pulling assets, run `ddev craft index-assets/all` when the asset index and the files don't match.
## Sync with SFTP
Any SFTP client works with the same host and user as SSH. Many have a folder sync option. SFTP clients often hide dot files.
## S3 volumes
With the first-party `craftcms/aws-s3` plugin, Craft stores uploads in an S3 bucket instead of the environment's storage, and nothing needs syncing. It adds a service to pay for and configure, and transforms of remote images need a download and upload per transform. fortrabbit's docs recommend it for many or large files, not by default.
```sh
ddev composer require craftcms/aws-s3
ddev craft plugin/install aws-s3
```
Keep the bucket credentials in ENV vars on each environment and reference them from the filesystem settings (`$S3_KEY_ID` etc.).
## Storage size
The storage plan caps the size. Without autoscaling, a full storage stops all file writes. Common causes of growth: unrotated log files, dumps and backups left on disk, image transforms created by bots, abandoned uploads. Find large folders over SSH:
```sh
ssh <env>@ssh.<region>.frbit.app 'du -sh ./* | sort -h'
```
## Common Pitfalls
1. **Uploads gone after a deployment** — the environment deploys with `replace` (often a deploy file without `strategy`). Switch to `merge` or add the volume to `excludePatterns`.
2. **Committing uploads to git** — bloats the repo and every build, and committed copies overwrite same-named files on the environment. Keep volumes in `.gitignore`.
3. **Expecting uploads to reach local through git** — git deployment only goes up. Pull them with rsync.
4. **rsync with mismatched trailing slashes** — creates `uploads/uploads/`. Use `dir/` on both sides.
5. **Volume base URL hardcoded to the local domain** — build it from an ENV var so it resolves per environment, e.g. `$PRIMARY_SITE_URL/uploads` (Craft 5.5+) or an alias defined from `App::env()`. Avoid `@web`: Craft derives it from the request.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |