Find a file
Oliver Davies 3d1004bced ci: remove deploy job for now
Remove the `deploy` job as it's trying to deploy to a server that no
longer exists, and is causing every CI action to fail.
2021-11-26 19:57:48 +00:00
.github ci: remove deploy job for now 2021-11-26 19:57:48 +00:00
.idea Exclude Platform.sh's Config Reader 2021-02-17 13:22:42 +00:00
assets Add sitemaps to robots.txt 2021-03-05 19:58:40 +00:00
config Add work site settings and company and role fields 2021-06-11 00:26:17 +01:00
config_splits/live Remove stage_file_proxy from live split 2021-03-06 11:19:30 +00:00
tools Add the missing vault variable 2021-05-25 20:30:27 +01:00
web chore: re-add markdown styles to body fields 2021-11-26 19:42:04 +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 Rename directory [ci skip] 2021-05-18 07:38:40 +01:00
composer.json Add drupal/site_settings 2021-06-10 23:59:45 +01:00
composer.lock build(deps): update Drupal to 8.9.20 2021-11-26 09:06:43 +00:00
docker-compose.yaml chore: update Tailwind configuration 2021-11-26 18:37:29 +00:00
phpcs.xml.dist Refactor to exclude rules rather than change severity 2020-12-17 23:42:20 +00:00
phpstan.neon Replace tightenco/collect with illuminate/collections 2021-04-23 14:51:51 +01:00
phpunit.xml.dist Update SIMPLETEST_BASE_URL 2020-10-24 19:38:57 +01:00
README.md Remove old local development documentation [ci skip] 2021-05-27 07:10:31 +01:00

oliverdavies.uk

Hosting

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

Provisioning

To re-provision the server:

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

# Run the provision playbook
ansible-playbook tools/deployment/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/deployment/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/deployment/vars/deploy_vars.yml, and performed during Ansistranos After update code build step.

Local development

Migrating data into the website

To view the status of all the migrations:

docker-compose exec php drush migrate:status

To run all the migrations:

docker-compose exec php drush migrate:import --all

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

docker-compose exec php drush migrate:import --all --update

Updating Drupal core

Updating Drupal core (and anything else) can be done using Composer. As this project is built using the Drupal core recommended project, all of the dependencies need to be updated:

docker-compose exec php composer update drupal/core-* --with-all-dependencies

Once this has completed, the updated composer.lock file can be committed and pushed.

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.