Setting up the Form builder on your server
You will need to have Docker (opens in a new tab) installed and running on your system. We recommend using the latest version of Docker Desktop.
Clone the Form builder (opens in a new tab) repository:
git clone https://github.com/AMPATH/ngx-openmrs-formbuilder
Navigate to the ngx-openmrs-formbuilder
directory and install dependencies using:
npm install
Create a Dockerized build by running:
docker build -t ng2-openmrs-formbuilder .
Setup environment variables as follows:
export OPENMRS_HOST_URL=http://172.17.0.1
export OPENMRS_SECURE=false
http://172.17.0.1 (opens in a new tab) is the OpenMRS host served by Docker on Linux. This could be different on Mac OS or Windows.
You could optionally tag (opens in a new tab) your build if you wish to push it to Docker Hub e.g.
docker build -t ng2-openmrs-formbuilder:bug-fixes
Spin up your Docker image using:
docker compose up
This will fire up a local server on http://localhost:4200
.
Troubleshooting
I get an unknown openmrs_host_url variable
error
-
You may run into the following error:
[emerg] 1#1: unknown "openmrs_host_url" variable nginx: [emerg] unknown "openmrs_host_url" variable
To fix it, use lowercase for the environment variables in the set up step:
export openmrs_host_url = http://172.17.0.1 export openmrs_secure = false