Pagoda Box & Statamic
Earlier this year, I took a chance and decided to leave Wordpress and migrate over to Statamic. My main issue with Wordpress had always involved my personal workflow and easily using the tools I loved. Statamic solved almost all of these issues, but I still wanted a better way to update the site without relying solely on Dropbox or using FTP to sync to a server.
At first, I figured I would go the Dropbox route but it brought on its own set of challenges: installing it on the host server, symlinking folders, permissions of folders, as well as a host who would continually kill the Dropbox daemon.
Lets fast forward a few months. I stumbled onto Pagoda Box while reading through my twitter feed one day and reached out to some folks currently using them. With a little back and forth correspondance, I instantly found myself at the sign-up page.
Pagoda Box is a PaaS which relies heavily on Git (SFTP is available but limited) for pushing changes to their server. In its simplest form, a user creates a php application with Pagoda Box which creates an ‘instance’ of your site. You also have the ability to easily create multiple ‘instances’ on demand. Of course, the flexibility to add caching, databases, custom dns names, as well as schedule cron jobs is available too.
For me, I basically just added Pagoda Box as a remote destination to my repo and pushed any changes. Couldn’t be simpler.
git add . git commit -m "new stuff" git push pagoda --all
A few caveats though for Statamic users. The repo on Pagoda Box is read-only so your content can’t be changed in the Statamic admin pages with a standard config. However, thanks to the services flexibility, you can add specific folders you would like writable in a Boxfile. This file is basically just YAML which allows for a ton of customization to your Pagodabox ‘instance’. You can specify which PHP version as well as name specific extensions, list out writable directories and so much more. Check their documentation for a complete list. Here is a quick glance at my Boxfile.
web1: name: scav1 php_version: 5.3.10 php_extensions: - mcrypt - curl - gd shared_writable_dirs: - _cache - _content - _logs after_deploy: - "rm -rf _cache/*"
Now the downside to having content as a writeable folder is the inability to push content using Git. Pagoda Box creates an empty directory on a shared storage cluster for your folder and links it back to your applications root directory. If you go this route, you’ll have to upload your markdown files and folder structures manually via SFTP but now you use the admin screens to write. It’s a trade off of accessibility and easability when it comes to content. Use Git, and push from your repo, or use writable folders and use the admin pages.
After all of this, I can’t begin to explain how great it is to be running this site on Pagoda Box’s platform now. I still want a better solution to content but that doesnt change how ridiculously easy it is!