Deploy a release
A HACC-Hui release contains two services: HACC-Hui (the Meteor application), and MongoDB (the backend database system).
Deployment is the process of bringing up these services on a production server.
We utilize Docker to manage deployment.
We publish the Docker Image for the HACC-Hui service to the HACC-Hui organization at DockerHub.
warning
Windows-based deployment is not supported.
Initial setup
When configuring a production server for the first time, you'll want to do the following:
Install Docker and Docker Compose
First, install Docker and Docker Compose on your production server.
Please consult the Docker installation documentation and the Docker Compose installation documentation for instructions.
note
TO install Docker on Ubuntu 18, I followed these instructions.
Note that you need to setup the user to not need sudo for docker.
I followed the standard docker-compose installation instructions.
Clone hacchui-docker
Next, clone the hacchui-docker repository with git clone https://github.com/HACC-Hui/hacchui-docker.git
.
Create config/settings.production.json
Your local hacchui-docker directory contains a subdirectory called "sample-config" containing a sample settings.production.json file called "sample.settings.production.json".
In order for HACC-Hui to deploy successfully, it expects to a file called "settings.production.json" in a directory named "config".
To setup this directory and file using sample.settings.production.json as a template, execute the following commands:
caution
More details on settings.production.json setup needed.
Bring up services
Now, cd into the top-level directory, where you should find a script called docker-compose-run.sh
. To make it executable, invoke:
Invoke it with:
This will download all the latest official public images for the two HACC-Hui services, and run them. The output should look like this:
Verify installation
Invoke the docker ps
command to verify that all HACC-Hui containers are running. It should look similar to this:
In addition, you should also check the HACC-Hui service by opening up your web browser and going to http://production-server:8888.
Update to a new release
To update to a new release, cd to the opq-docker directory on your production server and invoke:
This updates the .env file to specify the new version of the HACC-Hui (or MongoDB) release.
To restart the services with the updated release, invoke: