O3 Setup, Configuration & Deployment
Better O3 Documentation is Available
Please Note: Since this page was last created/updated, we have created a much better set of O3 Docs. Please see instead: O3 for Developers
This documentation is intended to enable administrators, implementers, and developers to set up and configure an OpenMRS Frontend 3.0 application (aka 3.x, aka O3). The O3 Project Overview is also helpful.
In This Guide:
Quick Start Guide: Get O3 running on your machine quickly
You will need a good internet connection for these steps.
1) Install Docker: You will first need to install a program called Docker Desktop on your machine (skip this step if you already have Docker Desktop installed - but double check that you have Docker Compose). Why? Docker will help handle some of the pesky technical tasks for you, like a chef in a kitchen helping you cook! We are trying to make your life easier by using this tool
Tip: On Macs: Check that you can manually open the Docker app. You will need to agree to some permissions in order for your machine to finish the installation.
2) Set up the recipe, the "Docker Compose File": The "docker compose" file is like your recipe for getting OpenMRS 3 onto your machine; and Docker is the chef that will do this for you. OpenMRS 3.x is a WIP, but to get the latest version of 3.x running on your machine, use this Docker Compose file. (This file will also share some documentation about the docker images.) Copy the docker-compose.yml file into a blank directory / empty folder on your own computer - eg put it into a directory/folder named "o3-docker-compose", and be sure to name the docker-compose.yml file as "docker-compose.yml".
Example of the contents of the O3 docker-compose.yml file copied into a user's own file in VS Code:
3) Time to get things running!
LINUX: $ cd /home/YOURUSERNAME/FOLDER/o3-docker-compose WINDOWS: C:\Users\YOURUSERNAME\FOLDER\o3-docker-compose MACS: % cd /Users/YOURUSERNAME/FOLDER/o3-docker-compose
LINUX: $ docker-compose up WINDOWS: > docker-compose up MACS: % docker-compose up
You will start to see lots of lines / activity happening as docker, your chef, uses your docker-compose.yml file as the recipe for all the things it needs to build the EMR on your machine.
You will know you were successful when you see lines like: frontend_1 | 127.0.0.1 - - [12/Oct/2022:00:51:59 +0000] "GET / HTTP/1.1" 301 169 "-" "curl/7.83.1"
Also check for success by opening your Docker Desktop app - if things have gone successfully, you should see these 4 containers (frontend, backend, gateway, and mariadb):