Giter VIP home page Giter VIP logo

patientor-docker's Introduction

Containerized app

Availbale URIs for both dev and prod

http://localhost:8080

http://localhost:8080/api/

http://localhost:8080/api/patients

http://localhost:8080/api/diagnosisCodes

About

This app runs all services inside docker. Individual services are only accessible via internal ports. Since the frontend and backend are inside the same docker application they can connect to each other via http://[APP_NAME]:[INTERNAL_PORT].
Nginx is set up as a reverse proxy so that we can use http://localhost:8080/api/ as the api endpoint. This more secure that exposing the app's actuall address. Inside nginx.conf you can see that internally location /api/ points to the app's actual address http://api:4000/api/.

Scripts

Production

Build
npm run docker:build

Start
npm run docker:up

Stop
npm run docker:down

Log into MongoDB:
npm run docker:mongo

List services:
npm run docker:ps

Reload Nginx:
docker:nginx:reload

Development

Build
npm run docker:dev:build

Start
npm run docker:dev:up

Stop
npm run docker:dev:down

Log into MongoDB:
npm run docker:dev:mongo

List services:
npm run docker:dev:ps

Reload Nginx:
docker:dev:nginx:reload

Debug with busybox:
npm run docker:dev:debug

Development Debug examples

docker compose -f docker-compose.dev.yml run --rm dev.debug-helper wget -O - http://dev.nginx:80

docker compose -f docker-compose.dev.yml run --rm dev.debug-helper wget -O - http://dev.nginx:80/api/

docker compose -f docker-compose.dev.yml run --rm dev.debug-helper wget -O - http://dev.api:4000

docker compose -f docker-compose.dev.yml run --rm dev.debug-helper wget -O - http://dev.mongo:27017

Remove dangling images

docker image prune

patientor-docker's People

Contributors

anthony-phillip-collins avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.