Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
🚧 (openapi) Generate Packages and Pin
Browse files Browse the repository at this point in the history
#15 #12 #13
  • Loading branch information
PhearZero committed Sep 12, 2019
1 parent 7167c7b commit 4335c1c
Show file tree
Hide file tree
Showing 9 changed files with 410 additions and 319 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
Dockerfile

17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node

RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app

WORKDIR /home/node/app

COPY package*.json /home/node/app

USER node

RUN yarn

COPY --chown=node:node . /home/node/app

RUN yarn
RUN yarn workspaces run build
RUN yarn upgrade
185 changes: 95 additions & 90 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,90 +1,95 @@
<div align="center">

<img src="https://raw.githubusercontent.com/HospitalRun/design/master/logo/logo-on-transparent.png" alt="HospitalRun logo"/>

![Last commit](https://img.shields.io/github/last-commit/hospitalrun/hospitalrun) [![Activity](https://img.shields.io/github/commit-activity/m/hospitalrun/hospitalrun)](https://github.com/hospitalrun/hospitalrun/pulse) ![Repo size](https://img.shields.io/github/repo-size/hospitalrun/hospitalrun) [![Slack](https://hospitalrun-slackin.herokuapp.com/badge.svg)](https://hospitalrun-slackin.herokuapp.com) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/hospitalrun) [![MIT](https://badgen.net/github/license/HospitalRun/hospitalrun)](https://github.com/HospitalRun/hospitalrun/blob/master/LICENSE)

</div>

All **HospitalRun** code lives in a single repository, an architecture generally called a monorepo. This repository holds all of HospitalRun's open source projects that lived in their own separate Github repos: [frontend](https://github.com/HospitalRun/hospitalrun-frontend), [server](https://github.com/HospitalRun/hospitalrun-server) and [components](https://github.com/HospitalRun/components).

## How to use it


## Toolchain & CLI

We recommend the use of [**nvm**](https://github.com/nvm-sh/nvm#install--update-script) for the management of different versions of Node.

#### yarn
Fast, reliable, and secure dependency management.
`npm i -g yarn`
## Getting Started

```
git clone git@github.com:HospitalRun/hospitalrun.git
git submodule update --init --recursive
yarn
yarn workspaces run build
yarn upgrade
# Do some coding then commit with
npx git-cz
# Test the cli
npx hospitalrun --version
```

# Updating the mono repo
After you are setup you can run
```
git submodule update --remote
git add ./packages
npx git-cz
```


## Commiting
This repo uses conventional commits. Commitizen is recommended for development. Once you have changes staged
you can run `git cz` from the root directory in order to commit to the proper standards

<hr />

# Behind HospitalRun

## Hosted by

[<img src="https://github.com/openjs-foundation/cross-project-council/blob/master/logos/openjsf-color.png?raw=true" width="120px;"/>](https://openjsf.org/projects/#atlarge)

## Sponsors

[![Sponsors](https://opencollective.com/hospitalrun/sponsors.svg?width=890)](https://opencollective.com/hospitalrun/contribute/sponsors-336/checkout)

## Backers

[![Backers](https://opencollective.com/hospitalrun/backers.svg?width=890)](https://opencollective.com/hospitalrun/contribute/backers-335/checkout)

## Lead Maintainer

[<img src="https://avatars2.githubusercontent.com/u/1620916?s=460&v=4" width="100px;"/><br /><sub><b>Maksim Sinik</b></sub>](https://github.com/fox1t)<br />

## Core Team

<!-- prettier-ignore -->
|[<img src="https://avatars1.githubusercontent.com/u/11684?s=460&v=4" width="100px;"/><br /><sub><b>Travis Boudreaux</b></sub>](https://github.com/tjboudreaux) | [<img src="https://avatars3.githubusercontent.com/u/25089405?s=460&v=4" width="100px;"/><br /><sub><b>Stefano Casasola</b></sub>](https://github.com/irvelervel) | [<img src="https://avatars3.githubusercontent.com/u/3400442?s=460&v=4" width="100px;"/><br /><sub><b>Michael J Feher</b></sub>](https://github.com/PhearZero) | [<img src="https://avatars1.githubusercontent.com/u/25009192?s=460&v=4" width="100px;"/><br /><sub><b>Riccardo Gulin</b></sub>](https://github.com/bazuzu666) | [<img src="https://avatars3.githubusercontent.com/u/18731800?s=460&v=4" width="100px;"/><br /><sub><b>Jack Meyer</b></sub>](https://github.com/jackcmeyer) | [<img src="https://avatars0.githubusercontent.com/u/6388707?s=460&v=4" width="100px;"/><br /><sub><b>Matteo Vivona</b></sub>](https://github.com/tehKapa) |
|---|---|---|---|---|---|

## Medical Supervisor

[<img src="https://avatars2.githubusercontent.com/u/24660474?s=460&v=4" width="100px;"/><br /><sub><b>M.D. Daniele Piccolo</b></sub>](https://it.linkedin.com/in/danielepiccolo)<br />

## Contributors

[![Contributors](https://opencollective.com/hospitalrun/contributors.svg?width=960&button=false)](https://github.com/HospitalRun/hospitalrun-frontend/graphs/contributors)

## Founders

<!-- prettier-ignore -->
| [<img src="https://avatars0.githubusercontent.com/u/609052?s=460&v=4" width="100px;"/><br /><sub><b>John Kleinschmidtr</b></sub>](https://github.com/jkleinsc) | [<img src="https://avatars0.githubusercontent.com/u/929261?s=400&v=4" width="100px;"/><br /><sub><b>Joel Worrall</b></sub>](https://github.com/tangollama) | [<img src="https://avatars0.githubusercontent.com/u/1319791?s=460&v=4" width="100px;"/><br /><sub><b>Joel Glovier</b></sub>](https://github.com/jglovier) |
|---|---|---|

# License

Released under the [MIT license](LICENSE).
<div align="center">

<img src="https://raw.githubusercontent.com/HospitalRun/design/master/logo/logo-on-transparent.png" alt="HospitalRun logo"/>

![Last commit](https://img.shields.io/github/last-commit/hospitalrun/hospitalrun) [![Activity](https://img.shields.io/github/commit-activity/m/hospitalrun/hospitalrun)](https://github.com/hospitalrun/hospitalrun/pulse) ![Repo size](https://img.shields.io/github/repo-size/hospitalrun/hospitalrun) [![Slack](https://hospitalrun-slackin.herokuapp.com/badge.svg)](https://hospitalrun-slackin.herokuapp.com) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/hospitalrun) [![MIT](https://badgen.net/github/license/HospitalRun/hospitalrun)](https://github.com/HospitalRun/hospitalrun/blob/master/LICENSE)

</div>

All **HospitalRun** code lives in a single repository, an architecture generally called a monorepo. This repository holds all of HospitalRun's open source projects that lived in their own separate Github repos: [frontend](https://github.com/HospitalRun/hospitalrun-frontend), [server](https://github.com/HospitalRun/hospitalrun-server) and [components](https://github.com/HospitalRun/components).

## How to use it


## Toolchain & CLI

We recommend the use of [**nvm**](https://github.com/nvm-sh/nvm#install--update-script) for the management of different versions of Node.

#### yarn
Fast, reliable, and secure dependency management.
`npm i -g yarn`
## Getting Started

```
git clone git@github.com:HospitalRun/hospitalrun.git
git submodule update --init --recursive
yarn
yarn workspaces run build
yarn upgrade
# Do some coding then commit with
npx git-cz
# Test the cli
npx hospitalrun --version
```

# Updating the mono repo
After you are setup you can run
```
git submodule update --remote
git add ./packages
npx git-cz
```

# Docker Develop Env
```
docker build -t hospitalrun-mono .
docker-compose up
```

## Commiting
This repo uses conventional commits. Commitizen is recommended for development. Once you have changes staged
you can run `git cz` from the root directory in order to commit to the proper standards

<hr />

# Behind HospitalRun

## Hosted by

[<img src="https://github.com/openjs-foundation/cross-project-council/blob/master/logos/openjsf-color.png?raw=true" width="120px;"/>](https://openjsf.org/projects/#atlarge)

## Sponsors

[![Sponsors](https://opencollective.com/hospitalrun/sponsors.svg?width=890)](https://opencollective.com/hospitalrun/contribute/sponsors-336/checkout)

## Backers

[![Backers](https://opencollective.com/hospitalrun/backers.svg?width=890)](https://opencollective.com/hospitalrun/contribute/backers-335/checkout)

## Lead Maintainer

[<img src="https://avatars2.githubusercontent.com/u/1620916?s=460&v=4" width="100px;"/><br /><sub><b>Maksim Sinik</b></sub>](https://github.com/fox1t)<br />

## Core Team

<!-- prettier-ignore -->
|[<img src="https://avatars1.githubusercontent.com/u/11684?s=460&v=4" width="100px;"/><br /><sub><b>Travis Boudreaux</b></sub>](https://github.com/tjboudreaux) | [<img src="https://avatars3.githubusercontent.com/u/25089405?s=460&v=4" width="100px;"/><br /><sub><b>Stefano Casasola</b></sub>](https://github.com/irvelervel) | [<img src="https://avatars3.githubusercontent.com/u/3400442?s=460&v=4" width="100px;"/><br /><sub><b>Michael J Feher</b></sub>](https://github.com/PhearZero) | [<img src="https://avatars1.githubusercontent.com/u/25009192?s=460&v=4" width="100px;"/><br /><sub><b>Riccardo Gulin</b></sub>](https://github.com/bazuzu666) | [<img src="https://avatars3.githubusercontent.com/u/18731800?s=460&v=4" width="100px;"/><br /><sub><b>Jack Meyer</b></sub>](https://github.com/jackcmeyer) | [<img src="https://avatars0.githubusercontent.com/u/6388707?s=460&v=4" width="100px;"/><br /><sub><b>Matteo Vivona</b></sub>](https://github.com/tehKapa) |
|---|---|---|---|---|---|

## Medical Supervisor

[<img src="https://avatars2.githubusercontent.com/u/24660474?s=460&v=4" width="100px;"/><br /><sub><b>M.D. Daniele Piccolo</b></sub>](https://it.linkedin.com/in/danielepiccolo)<br />

## Contributors

[![Contributors](https://opencollective.com/hospitalrun/contributors.svg?width=960&button=false)](https://github.com/HospitalRun/hospitalrun-frontend/graphs/contributors)

## Founders

<!-- prettier-ignore -->
| [<img src="https://avatars0.githubusercontent.com/u/609052?s=460&v=4" width="100px;"/><br /><sub><b>John Kleinschmidtr</b></sub>](https://github.com/jkleinsc) | [<img src="https://avatars0.githubusercontent.com/u/929261?s=400&v=4" width="100px;"/><br /><sub><b>Joel Worrall</b></sub>](https://github.com/tangollama) | [<img src="https://avatars0.githubusercontent.com/u/1319791?s=460&v=4" width="100px;"/><br /><sub><b>Joel Glovier</b></sub>](https://github.com/jglovier) |
|---|---|---|

# License

Released under the [MIT license](LICENSE).
46 changes: 46 additions & 0 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
version: '3.7'
services:
dev-proxy:
image: jwilder/nginx-proxy
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
hospitalrun-frontend:
build:
context: ./packages/frontend
ports:
- "3000:3000"
depends_on:
- hospitalrun-db
volumes:
- ./packages/frontend:/home/node/app
- /home/node/app/node_modules
environment:
- CHOKIDAR_USEPOLLING=true
- NODE_ENV=production
- VIRTUAL_HOST=hospitalrun-frontend
hospitalrun-server:
build:
context: ./packages/server
ports:
- "4000:3000"
depends_on:
- hospitalrun-db
volumes:
- ./packages/server:/home/node/app
- /home/node/app/node_modules
environment:
- NODE_ENV=production
- VIRTUAL_HOST=hospitalrun-server
hospitalrun-db:
image: couchdb:latest
ports:
- "5984:5984"
environment:
- VIRTUAL_HOST=hospitalrun-db
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5984/"]
interval: 10s
timeout: 90s
retries: 9
32 changes: 25 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,48 @@ services:
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
hospitalrun-frontend:
build:
context: ./packages/frontend
image: hospitalrun-mono
command: yarn workspace @hospitalrun-org/frontend start
expose:
- 3000
ports:
- "3000:3000"
depends_on:
- hospitalrun-db
volumes:
- ./packages/frontend:/home/node/app
- .:/home/node/app
- /home/node/app/node_modules
- /home/node/app/packages/server/node_modules
- /home/node/app/packages/frontend/node_modules
- /home/node/app/packages/cli/node_modules
- /home/node/app/packages/core/node_modules
- /home/node/app/packages/components/node_modules
- /home/node/app/packages/docs/node_modules
environment:
- CHOKIDAR_USEPOLLING=true
- NODE_ENV=production
- VIRTUAL_HOST=hospitalrun-frontend
hospitalrun-server:
build:
context: ./packages/server
command: yarn dev
image: hospitalrun-mono
command: yarn workspace @hospitalrun-org/server dev
expose:
- 3000
- 9229

ports:
- "4000:3000"
- "9229:9229"
depends_on:
- hospitalrun-db
volumes:
- ./packages/server:/home/node/app
- .:/home/node/app
- /home/node/app/node_modules
- /home/node/app/packages/server/node_modules
- /home/node/app/packages/frontend/node_modules
- /home/node/app/packages/cli/node_modules
- /home/node/app/packages/core/node_modules
- /home/node/app/packages/components/node_modules
- /home/node/app/packages/docs/node_modules
environment:
- NODE_ENV=production
- VIRTUAL_HOST=hospitalrun-server
Expand Down
2 changes: 1 addition & 1 deletion packages/core
2 changes: 1 addition & 1 deletion packages/server

0 comments on commit 4335c1c

Please sign in to comment.