Find a file
2021-03-12 21:21:41 +00:00
.github Tidy CI workflow, remove obvious step names 2021-02-26 09:50:20 +00:00
.idea Exclude Platform.sh's Config Reader 2021-02-17 13:22:42 +00:00
.platform Update routes.yaml 2021-02-22 02:07:58 +00:00
assets Add sitemaps to robots.txt 2021-03-05 19:58:40 +00:00
config Update view metatags 2021-03-12 21:21:41 +00:00
config_splits/live Remove stage_file_proxy from live split 2021-03-06 11:19:30 +00:00
tools Remove Ansible playbooks and roles 2021-02-11 08:53:16 +00:00
web Remove video classes variable 2021-03-12 17:38:48 +00:00
.docker.env.example Add Docker and Docker Compose 2021-02-11 08:53:15 +00:00
.dockerignore Add Docker and Docker Compose 2021-02-11 08:53:15 +00:00
.env.example Add Platform.sh required files 2021-02-11 08:53:16 +00:00
.environment Add Platform.sh required files 2021-02-11 08:53:16 +00:00
.gitignore Add Platform.sh required files 2021-02-11 08:53:16 +00:00
.platform.app.yaml Fix cron command 2021-03-05 20:22:58 +00:00
composer.json Add sitemap module 2021-03-05 19:58:27 +00:00
composer.lock Update contrib projects 2021-03-12 17:48:14 +00:00
docker-compose.yaml Add Docker and Docker Compose 2021-02-11 08:53:15 +00:00
phpcs.xml.dist Refactor to exclude rules rather than change severity 2020-12-17 23:42:20 +00:00
phpstan.neon Remove illuminate/support dependency 2020-12-08 00:18:24 +00:00
phpunit.xml.dist Update SIMPLETEST_BASE_URL 2020-10-24 19:38:57 +01:00
README.md Document custom DDEV commands in README 2020-10-31 09:25:51 +00:00

oliverdavies.uk

Hosting

This site is hosted on a DigitalOcean droplet, which was created using Ansible (see tools/ansible/digitalocean.yml).

Provisioning

To re-provision the server:

# Download the required roles
ansible-galaxy install -r tools/ansible/requirements.yml --force

# Run the provision playbook
ansible-playbook tools/ansible/provision.yml

Deploying

Deployments for this site for managed with Ansible and Ansistrano. Ansible Vault is used to manage sensitive information like database passwords.

Deployments are triggered automatically when changes are pushed to GitHub, and are performed automatically via GitHub Actions on each push to the production branch.

To run a deployment manually, run ansible-playbook tools/ansible/deploy.yml --ask-vault-pass. The Vault password is stored in LastPass.

Generating settings files

Production settings files are generated automatically during a deployment. This is done using the opdavies.drupal_settings_files Ansible role, using variables from tools/ansible/vars/deploy_vars.yml, and performed during Ansistranos After update code build step.

Local development

Local development is done using DDEV-Local.

Custom DDEV commands

Drupal

Command Description
ddev app install Install the site based on the existing config
ddev app refresh Re-import the existing config and rebuild cache

Front-end

Command Description
ddev theme build Compile a production (minified and purged) version of the theme's CSS and JS
ddev theme dev Compile a development version of the theme's CSS and JS
ddev theme install Install the node dependencies for the theme
ddev theme ssh SSH into the theme directory within the web container
ddev theme watch Compile a development version of the theme's CSS and JS, and watch for changes

Migrating data into the website

To view the status of all the migrations:

bin/drush.sh migrate:status

To run all the migrations:

bin/drush.sh migrate:import --all

To run all the migrations and update the existing migrated content:

bin/drush.sh migrate:import --all --update

Talks ordering

In order to keep the talks page in the correct order, based on when the next time a talk is being given, the created date for the talk node is automatically updated on each save to match the date of the most future event for that talk.

The view is then sorting the talk nodes based on their created date.