This project holds the build configuration for the PATH DRC EMR MVP application, found on https://om.rs/drc, built on the community's reference application EMR "OpenMRS 3.0".
Copy the .env.example file to .env or create a new file with the same name and values.
TAG=latest-libikisi docker compose build --build-arg BUILD_TYPE=site --build-arg MVN_PROJECT=libikisi
TAG=latest-libikisi docker compose up
The new OpenMRS UI is accessible at http://localhost/openmrs/spa
OpenMRS Legacy UI is accessible at http://localhost/openmrs
This distribution consists of four images:
- db - This is just the standard MariaDB image supplied to use as a database
- backend - This image is the OpenMRS backend. It is built from the main Dockerfile included in the root of the project and
based on the core OpenMRS Docker file. Additional contents for this image are drawn from the
distrosub-directory which includes a full Initializer configuration for the reference application intended as a starting point. - frontend - This image is a simple nginx container that embeds the 3.x frontend, including the modules described in the
frontend/spa-build-config.jsonfile. - gateway - This image is an even simpler nginx reverse proxy that sits in front of the
backendandfrontendcontainers and provides a common interface to both. This helps mitigate CORS issues. - backup - This image controls the backup process which creates backups of all the files and databases according to the configured schedule.
Each instance of the DRC EMR needs to have its instance name configured in the .env file. This is done by setting the OMRS_EXTRA_DRC_INSTANCE environment variable to the name of the top-level location for that instance. For example, for the instance at Centre Hospitalier Akram, this variable should be set to Centre Hospitalier Akram. This variable is used to drive the configuration of instance-specific metadata, such as ensuring that only locations for that instance are available.
The metadata for the DRC instance is in the openmrs-content-path-drc content package. Please see the GitHub repository for more information.
In situations where the instance running the project is not connected to the internet we provide pre-packaged images which can be loaded on the instance. To obtain the image check under the Releases section and download the path-drc-emr-images-bundle.tgz file.
To load the images on the instance, extract the path-drc-emr-images-bundle.tgz file and run the following script:
./load-images.shThis project provides out-of-the-box backup and restore functionality for your OpenMRS deployment, powered by the robust Restic tool. This enables you to back up and restore your application data using a wide variety of storage backends supported by Restic, such as local disk, S3, Azure, Google Cloud Storage, and more.
- Backup and restore are managed by dedicated Docker Compose services using the
mekomsolutions/restic-compose-backupandmekomsolutions/restic-compose-backup-restoreimages. - The backup service periodically snapshots your data volumes and database, storing them in your configured Restic repository.
- The restore service can be used to recover your data from a specific snapshot.
You can configure backup and restore behavior using the following environment variables in your .env file or directly in your Compose files:
| Variable | Description |
|---|---|
RESTIC_REPOSITORY |
The Restic repository URL (e.g., local path, s3, etc.) |
RESTIC_PASSWORD |
Password for the Restic repository |
RESTIC_KEEP_DAILY |
Number of daily snapshots to keep |
RESTIC_KEEP_WEEKLY |
Number of weekly snapshots to keep |
RESTIC_KEEP_MONTHLY |
Number of monthly snapshots to keep |
RESTIC_KEEP_YEARLY |
Number of yearly snapshots to keep |
LOG_LEVEL |
Log verbosity (e.g., info, debug) |
CRON_SCHEDULE |
Cron schedule for automatic backups (e.g., 0 2 * * * for daily at 2am) |
RESTIC_RESTORE_SNAPSHOT |
(Restore only) The snapshot ID or tag to restore |
BACKUP_PATH |
Local directory for storing backup repository (default: ./backup) |
- The
backendanddbservices are labeled and configured to include their data volumes in the backup. - Additional volumes (e.g., for configuration checksums, person images, complex obs) are also included and labeled for backup.
To restore from a backup:
- Set the
BACKUP_PATH,RESTIC_PASSWORD, andRESTIC_RESTORE_SNAPSHOTenvironment variables. - Start the restore service:
docker compose -f docker-compose.yml -f docker-compose-restore.yml up -dThis will restore the specified snapshot to the appropriate volumes. The backend and db services are configured to wait for the restore to complete before starting.
IMPORTANT
The restore process will leave a restore container that will block the backup process. To clean up the restore container, run the following command:
docker compose -f docker-compose.yml -f docker-compose-restore.yml rm restore
docker compose -f docker-compose.yml -f docker-compose-restore.yml exec backup restic unlock -v