For more information about this project, visit MassVaxx. The following sections provide multiple methods to setup and run the system.
See README.md in sandbox directory for further instructions.
- Node.js is installed.
- MassVaccinationSystem project source code downloaded.
-
Create .env file in /broker directory with the contents:
DEVELOPMENT=1 FHIR_URL_BASE=http://fhir-dstu2-nprogram.azurewebsites.net/ -
Run the following commands:
cd <MassVaccinationSystem>/PatientRegistrationApp npm install npm run devbuild cd <MassVaccinationSystem>/PointOfDispensingApp npm install npm run devbuild cd <MassVaccinationSystem>/broker npm install node server.js
- You'll have a web server running on port 3000 with the following URLs available:
http://localhost:3000/Registration is PatientRegistrationApp
http://localhost:3000/POD is PointOfDispensingApp - You can access broker endpoints directly two ways, e.g.:
http://localhost:3000/healthcheck (for test env only)
http://localhost:3000/broker/healthcheck (for proxied front-end connections) - To access from other workstations, make sure your firewall allows connections over port 3000 and replace localhost with your IP address or FQDN.
- The front-end should embed broker endpoints as "/broker/" WITHOUT "http://localhost:3000" to allow for the webserver to be at a different host/port/https!
- The .env sets the FHIR server to a public test server. You can change it to another. Here are some potentials, though many are down: https://wiki.hl7.org/index.php?title=Publicly_Available_FHIR_Servers_for_testing
- Node.js is installed.
- Docker Compose and any dependencies are installed.
- MassVaccinationSystem project source code downloaded.
- In /, copy env.template to a file named .env (note the dot in .env filename)
and update the FHIR_URL_BASE variable to
FHIR_URL_BASE=http://localhost:8080/hapi-fhir-jpaserver/fhir - In /data/hapi/, copy hapi.properties.template to a file named hapi.properties.
- (Optional) Edit .env and /data/hapi/hapi.properties file to change default database passwords (HAPI_DB_PASSWORD). Make sure the passwords match in .env and hapi.properties.
Perform each of the following in a separate terminal:
- Navigate to / and run
docker-compose -f docker-compose-dev.yml up --build - Navigate to /broker and run
npm install. Once dependencies are installed, runnpm run devstart - Navigate to /PatientRegistrationApp and run
npm install. Once dependencies are installed, runnpm run serve - Navigate to /PointOfDispensingApp and run
npm install. Once dependencies are installed, runnpm run serve
- The Patient Registration App can be viewed at http://localhost:8081
- The Point of Dispensing App can be viewed at http://localhost:8082
- HTTP requests from the Vue servers will automatically be redirected to broker (running on port 3000) for you
- Any changes made to the source files for Broker, PatientRegistration, or PointOfDispensing will immediately take effect! Changes made to the Vue apps will cause the browser to automatically refresh with the updated code/content
If you encounter issues connecting to the database after following the instructions above (e.g. server address not found, invalid database credentials), try performing the steps below. Note that these commands will delete all existing data from the database.
- Stop the docker containers and broker
- Run
docker-compose down -vordocker-compose -f docker-compose-dev.yml down -v(depending on how you've been running docker) from the root project directory - Restart the docker containers and broker
If you are still having connectivity issues, try the following steps
- Stop the docker containers and broker
- Run
docker-compose down -vordocker-compose -f docker-compose-dev.yml down -v(depending on how you've been running docker) from the root project directory - Run
docker container prune -f - Run
docker volume prune -f - Run
docker network prune -f - Restart the docker containers and broker