# Runcloud
# Setup a basic staging site on the Dusted Digital using RunCloud
Before getting starting, you should have already created a staging branch, a zip or tar file of the media library, and a backup of the DB.
Steps for RunCloud
- From the admin page, choose the Dusted Digital server and 'Deploy a New web App'
- Choose Git Repository and Bitbucket
- Add the name of the app (replace any spaces with hyphens).
- Keep 'Use existing system user' checked.
- Choose
dustedadminas the owner. - Domain should just be the name of the client appended with
.dusted.digital. i.e.client.dusted.digital - Keep 'enable www for this domain' unchecked.
- For DNS Integration, Keep 'None - I will set up DNS records' selected (save the A records as you will need them later).
- For SSL/TLS method, choose basic.
- For Git, copy and paste the name of the repo:
dusted/name-of-client. Make sure you don't have any additional/'s. - Select the branch, ideally
staging(create this branch in the repo if it doesn't exist). - Save the text for the deployment key as you will need this for the next stage.
- Check Basic settings (Public Path, PHP version, NGINX and Production mode) defaults are all OK.
- Deploy the application.
Add your deployment key to Bitbucket
- Choose your repo in Bitbucket.
- From the repo, go to
Repository settings(you might have to increase your user privileges if this option is unavailable). - Choose 'Access keys' from the sub-navigation.
- Add a new key for Staging and copy and paste RunCloud's deployment key.
Point your DNS to your server in CloudFlare
- CF handles the DNS for the
dusted.digitaldomains. - Request the A records are added (or login to CF and add them).
Add the database for your application
- Back RunCloud and on the Dusted Digital server, choose Databases from the sub-navigation.
- Add a new database.
- DB Name should be the name of the client appended with
db. i.e.clientnamedb. - For DB Collation,
utf8_general_cishould be fine for most WP sites. - For DB User,
cmsdbadminshould be fine. - Add these credentials to the
wp-config-staging.phpfor your site (you can get the DB Password from the other sites hosted on the server). - SSH to the Dusted Digital server and import the database. See MySQL for the command.
- Perform a search and replace on the DB and update the production URL for with the Staging URL.
- Transfer and uncompress the media library i.e.
unzip Archive.zip.
Now, make a cup of tea
← Platform.sh Forge →