Drupal 9 Cloudways deployment

Having become a little disillusioned with Acquia’s high cost and debatable quality of service, I’ve been looking into alternatives for deploying Drupal sites that aren’t huge enough to warrant Acquia’s infrastructure and need a bit more flexibility in the services they use (more than just Solr with no admin interface).

So currently I’m trying out Cloudways and I thought I’d document it a little bit as I go because, although their documentation is okay, it hasn’t been plain sailing.

Teams

Firstly, if you’re setting up a team do not let the team members set up free trial accounts to play around. When you create a team, the team leader needs to set up an account and then add the team members’ emails to invite them. If they already have an account linked to that email address the Cloudways system will not allow the account and the suggestion in the interface to contact support just means that someone in support will tell you this. And you can’t destroy the team members accounts to get around this – believe me I’ve tried.

Github repo

Cloudways allows you to set up a Git repo for deployments – you can then click a button and it will deploy the code from the Git repo to your application. This is useful (nowhere near as comprehensive as Acquia’s deployment of course) but I kept getting an error message that said something like “Unfortunately, operation failed due to unexpected error.”

The ssh key worked as I’d used it on the command line to clone the repository on the server to get started with having a tinker. But this meant that the automation doesn’t work.

It turns out that when you add your repo URL as ‘git@github.com:<your account>/<your repo>.git‘ the system doesn’t cope with the ‘.git‘ at the end. Strip that off and it works. Remember that Github uses main instead of master now as the branch name.

Once this is sorted the instructions for setting up Drupal on Cloudways work fine.

It’s worth installing Shield to put Basic Auth in front of your site to avoid the site showing up in search results or other people seeing it until it’s ready to go live:

composer require drupal/shield

This is as far as I’ve got at the moment. I’ll update it as I get Github Actions working for the composer install stuff.

0 Shares:
You May Also Like