-
Notifications
You must be signed in to change notification settings - Fork 4
Deploying an application upgrade to production
Update this property:
local_product_version: "2.1.0"
Create the tag
git tag -a 2.1.0 -m '2.1.0'
Push the new tag to GitHub
git push origin 2.1.0
In the release notes landing page for the draft release note, edit the release notes, associate with a tag, and click Publish Release.
This kicks off the Create and publish a Docker image
Github action. The run should have the name of the tag, e.g. 2.1.0
. This should run fairly quickly.
Confirm that Recent tagged image versions at https://github.com/gwu-libraries/scholarspace-hyrax/pkgs/container/scholarspace-app shows the new image. Copy the path to the image, e.g. ghcr.io/gwu-libraries/scholarspace-app:2.1.0
Update the app docker image tags in docker-compose.yml
.
Compare and make changes in docker-compose.yml
as needed.
Compare changes in example.env
as needed.
git checkout master
git pull origin master
(this assumes that the last commit to master
is the commit that was tagged for this release)
docker compose down
docker image ls
docker image rm <scholarspace-app image id>
docker image rm <scholarspace-hyrax-solr image id>
docker volume ls
Remove app-hyrax
volume
docker volume rm scholarspace_app-hyrax
Rebuild and bring up docker containers
docker compose -f docker-compose-prod.yml up -d
Watch logs
docker compose logs -f
docker exec -it --user scholarspace scholarspace-hyrax-app-server bash -l
RAILS_ENV=production rake assets:precompile
(If assets still do not show, consider docker compose down
then docker compose up -d
)
(while in the container)
RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake gwss:apply_content_block_changes
Browse to https://scholarspace.library.gwu.edu