Build and publish a new release of HACC-Hui
We utilize Docker and Docker Compose to containerize and deploy HACC-Hui. For Mongo, we use the official Mongo image without modification.
This page provides documentation on the standard procedures used to build a new release of HACC-Hui using Docker. The basic steps are shown in the right sidebar and documented in the following sections.
The next sections document each of these steps.
Install Docker and Docker Compose
Make sure you have Docker and Docker Compose installed on your development and production systems.
Please refer to the official Docker install documentation and Docker-Compose install documentation for installation instructions. If you are on a Mac or Windows, you can install Docker Desktop.
In addition, you will need an account on DockerHub, and your account will need to be a member of the DockerHub HACC-Hui organization.
Build a new Docker Image
The HACC-Hui repo contains a directory named docker/ containing a script called docker-build.sh.
To build a new Docker image, cd
into the /docker
subdirectory, and invoke docker-build.sh
. This command takes 5-10 minutes to complete on my laptop.
A typical run looks like this:
The result of the build will be a new Docker image named hacchui:latest
.
Once the script has finished running, you can confirm that the image has been successfully created by invoking the docker image ls
command.
Publish the Image to DockerHub
First, make sure that your DockerHub account is a member of the HACC-Hui DockerHub organization.
Second, determine the new version number you'll associate with your image. Use https://hub.docker.com/r/hacchui/hacchui/tags to determine the current DockerHub version number associated with HACC-Hui.
You'll want to increment the major, minor, or bugfix component of the current version number to get the new version number.
Third, invoke the docker tag command to attach the new version number. For example, here is the command to tag the newly built image with the new version number 2.0.12:
Fourth, publish the tagged image to DockerHub. To do this, login to your DockerHub account by invoking the docker login
command.
Then push the image to the hacchui organization on DockerHub by invoking the docker push
command. Here's an example of pushing the image that's been tagged with the new version number 1.0.12:
Update the HACC-Hui Docker Compose .env file
Once the image containing the new version of HACC-Hui is pushed to DockerHub, you can now update the Docker Compose .env file in the hacchui-docker repository to indicate that future installations of HACC-Hui should use this new image.
To do this, checkout the HACC-Hui-docker repository from GitHub. You must have commit privileges to this repo.
Next, edit the .env file. The first section of the file specifies the version of the image file. A recent version looks like this:
Edit this file to update the version number associated with your service to its new version number.
Commit this change to GitHub.
Create a new hacchui-docker release
Now it is time to document your update. We do this by making an HACC-Hui release.
Please name your release as a date in YYYY-MM-DD format. Use the description field to briefly describe the updates in this release.
If you now want to deploy your new release, continue to the next section.