Before deploying changes, you are expected to test them locally by rebuilding the relevant containers.
To rebuild the ul-website container, run a command like the following from the root of this repository:
docker build . -t ul-website:latest
To rebuild the ul-imports container, see the documentation in the ul-imports repository.
Once you have a new container image to test, you can deploy it locally using commands like the following from the root of this repository:
docker-compose down
docker-compose up -d.
At a minimum, you should verify that the website functions as expected, and that imports run. To verify that the website functions as expected:
- Start the composition (see above).
- Synchronise your CouchDB container with production.
- Connect a browser to
https://localhost:4896/
. - Verify that all static pages are served as expected.
- Test the search functionality (the first search may fail or take a long time as the Lucene index is rebuilt).
- Navigate to an individual record and verify that that content appears as expected.
- Verify that logging in works as expected.
- Perform a full synchronisation using the ul-imports VM works without errors (see the README for details).
Once you are satisfied that the updated container(s) are working as expected, you will need to copy the container image to production. From your local machine, save the updated container(s) using commands like:
docker save ul-website | gzip > /tmp/ul-website.tar.gz
docker save ul-imports | gzip > /tmp/ul-imports.tar.gz
scp /tmp/ul-*.tar.gz ul-vm:
You'll then need to SSH to the ul-vm, and run commands like the following:
gunzip ul-website.tar.gz
sudo docker import ul-website
cd /srv/ul-website
sudo docker-compose down
sudo docker-compose up -d
You should perform the same QA steps following deployment.