diff --git a/README.md b/README.md index dc72f36..22d218b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,19 @@ -# hdhs -Haiti Distributed Healthcare System +

+ +

Haiti Community Health Initiative Application

+

+

+ A containerized progressive web application paired with patient data management tooling built to serve the Haiti Community Health Initiative in their mission to help form healthy and self-directed communities in Haiti. +

+ +--- + +## Getting Started + +The application runs on docker, which can be installed [here](https://docs.docker.com/install/). +If you're a linux user, you'll also need to install [docker-compose](https://docs.docker.com/compose/install/) separately. Otherwise, it's included in the Mac and PC versions of "Docker Desktop" + +- The PWA and accompanying database can be started by running the command `docker-compose up` from the root directory. + - `docker-compose down` will then stop the docker processes from running in the background. +- Once the images have been built and the processes started, the PWA can be seen at your localhost, at the port specified in [docker-compose.yml](https://github.com/Haiti-Distributed-Healthcare-System/hdhs/blob/dev/docker-compose.yml). +- More tips to troubleshoot docker are available [here](https://github.com/Haiti-Distributed-Healthcare-System/hdhs/wiki/Using-Docker). diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..8c8a8a3 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3' + +services: + pwa: + build: + context: ./pwa + volumes: + - ./pwa/:/app + ports: + - "3000:3000" + container_name: haiti_pwa \ No newline at end of file diff --git a/pwa/.dockerignore b/pwa/.dockerignore new file mode 100644 index 0000000..929dccc --- /dev/null +++ b/pwa/.dockerignore @@ -0,0 +1,2 @@ +node_modules +npm-debug.log* \ No newline at end of file diff --git a/pwa/Dockerfile b/pwa/Dockerfile new file mode 100644 index 0000000..397c7e0 --- /dev/null +++ b/pwa/Dockerfile @@ -0,0 +1,16 @@ +FROM node:12.10.0 + +COPY package*.json ./data/ + +WORKDIR /data + +RUN npm install + +ENV PATH /data/node_modules/.bin:$PATH + +COPY . /data/app +WORKDIR /data/app + +EXPOSE 3000 + +CMD ["npm", "start"]