- Computer with MINIMUM 8gb RAM, modern OS (so Windows, Linux or Mac)
- NodeJS v18+
- Ubuntu v22.04
- PHP 8.1+
- DDEV
- Docker
PRIMARY_SITE_URL
CRAFT_ENVIRONMENT
CRAFT_DB_DRIVER
CRAFT_DB_SERVER
CRAFT_DB_PORT
CRAFT_DB_DATABASE
CRAFT_DB_USER
CRAFT_DB_PASSWORD
CRAFT_DB_SCHEMA
CRAFT_DB_TABLE_PREFIX
CRAFT_APP_ID
CRAFT_SECURITY_KEY
CRAFT_WEB_ROOT
UI_BASE_URL
- Add empty .env file to the root of the project (next to .env.example)
- Add CRAFT_ENVIRONMENT=dev to the .env
- Change web > .htaccess_dev into .htaccess (or prod if you are putting this on your production server)
- Configure the project
ddev config
- Start the DB server
ddev start
- Install necessary packages
ddev composer install
- Install craft
ddev --import-db --file=starter.sql.gz
- Configure craft
ddev craft setup
- Launch craft
ddev launch
- In the GraphQL tab:
- Select Schemas and in the Private Schema, make sure all checkboxes are checked.
- Then, select the Tokens tab and create a new token. Name it something like 'Private' and copy only the token value after
Bearer
.
- Create a FileSystem for asset uploads and Assets, but make sure to name the path ANYTHING OTHER THAN ASSETS
(For example, if you have an assets/ folder, that would conflict with the /assets page in the control panel.)
- Purchase a Digital Ocean droplet
- Connect the droplet to RunCloud.io
- Create a system user and generate a password.
-----Store passwords for SSH connection to server later-------
- Create a DB user, then a DB in runcloud.
- Create a webapp or your CMS
- From a GH repo
- Prefer www version
- Generate and put the deploy key in your GH repo
- Add
:/home/app_user_name
to the end of open_basedir
- Using the Digital Ocean console or SSH (vscode or other) into the DB server
- run
gunzip db.sql.gz
- run
mysql -u <db_user_name> -p <db_name> < db.sql
- Add to DNS records
- if domain
A_record @ server_ip 600s
CName www url_name.com. 1hour
- if subdomain
A_record url_name server_ip 1hour
CName *.url_name url_name.com. 1hour
- Add SSL record
- Add .htaccess file to the web directory
- Create the graphql schema and token
- In CraftCMS, check Utilities > System Report > scroll to Requirements and make sure these are all removed from the list in RunCloud.io Webapp settings.
RunCloud sets up webhooks into our github repos, so the deployment of changes should be done through that webhook. When you git push
to main or merge a PR to main, the production site will auto-magically update.
- Live preview
- Revalidate Front End data on save of Entries / Categories / Globals
- SEO optimization
- Docker 🐳 — Docker Installation
- DDEV 🤓 — DDEV Installation
- Composer 🎼 — Composer
- CraftCMS 📝 — CraftCMS
- .env 🦺 — .env
- Node V18+, I recommend using NVM to install and manage — NVM