Find a file
2020-10-30 00:23:10 +00:00
.ddev Add app command for DDEV 2020-10-29 00:25:04 +00:00
.github Combine workflows into one with multiple jobs 2020-10-30 00:23:10 +00:00
.idea Remove .git directories within contrib modules 2020-10-24 19:46:17 +01:00
config Add a new 'Is online' field to event paragraphs 2020-10-24 20:26:36 +01:00
tools/ansible Move ansible.cfg into the tools directory 2020-10-08 19:38:30 +01:00
web Integrate the typography plugin with dark mode 2020-10-29 01:43:33 +00:00
.gitignore Add DDEV configuration 2020-09-16 19:41:48 +01:00
.gitmodules Add slides repo as a submodule 2020-08-12 00:51:59 +01:00
composer.json Remove .git directories within contrib modules 2020-10-24 19:46:17 +01:00
composer.lock Remove .git directories within contrib modules 2020-10-24 19:46:17 +01:00
phpcs.xml.dist Add phpcs.xml.dist 2020-06-30 17:34:31 +01:00
phpstan.neon Fix PHPStan issues 2020-09-04 22:20:30 +01:00
phpunit.xml.dist Update SIMPLETEST_BASE_URL 2020-10-24 19:38:57 +01:00
README.md Fix link to the Ansistrano role 2020-07-02 23:18:37 +01: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.

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.