Find a file
2020-07-11 11:35:10 +01:00
.dependabot Add dependabot config 2020-05-30 15:26:32 +01:00
.github/workflows Deploy automatically via GitHub Actions 2020-07-02 22:53:35 +01:00
.idea Add tests for counting previous talks 2020-06-30 12:50:21 +01:00
bin Remove start and stop scripts 2020-05-20 20:57:46 +01:00
config Add scheduler module, configure for blog posts 2020-07-11 11:35:10 +01:00
tools/ansible Use the release version for Drupal's deployment indentifier 2020-07-01 23:51:04 +01:00
web Fix collapsing page widths 2020-07-02 18:13:05 +01:00
.gitignore Add phpcs.xml.dist 2020-06-30 17:34:31 +01:00
.php-version Use Symfony server for local development 2020-04-10 10:48:35 +01:00
ansible.cfg No cows 2020-06-10 21:26:55 +01:00
composer.json Add scheduler module, configure for blog posts 2020-07-11 11:35:10 +01:00
composer.lock Add scheduler module, configure for blog posts 2020-07-11 11:35:10 +01:00
docker-compose.yaml Use Symfony server for local development 2020-04-10 10:48:35 +01:00
Makefile Update phpcs in Makefile 2020-06-30 17:34:42 +01:00
php.ini Use Symfony server for local development 2020-04-10 10:48:35 +01:00
phpcs.xml.dist Add phpcs.xml.dist 2020-06-30 17:34:31 +01:00
phpstan.neon Fix PHPStan and PHPCS errors 2020-06-01 19:03:25 +01:00
phpunit.xml.dist Use an in-memory sqlite database for testing 2020-05-15 11:53:50 +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.