This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from HospitalRun/master
Updating from original
- Loading branch information
Showing
305 changed files
with
3,375 additions
and
3,168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,12 +15,49 @@ To contribute, | |
|
||
## Setting up the Local Development Environment | ||
|
||
### Get the source code | ||
|
||
1. [Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) this repository | ||
2. Open your favorite command line tool and navigate to the directory you wish to clone this repository to: `cd /path/to/clone` | ||
3. [Clone](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) your fork: `git clone [email protected]:{your username}/hospitalrun-frontend.git` | ||
4. Navigate to the hosptialrun-frontend directory: `cd hospitalrun-frontend` | ||
5. Install dependencies: `yarn` | ||
6. Run the application `yarn start` | ||
|
||
### Configure CouchDB | ||
|
||
CouchDB is the server side database which data from the frontend will sync to. In order to login | ||
to HospitalRun, CouchDB is required. For convienence, we have added a docker compose file in the | ||
root of this project to help launch CouchDB. However, you could install and run CouchDB in any way you wish. | ||
|
||
The following directions will be for running CouchDB via Docker Compose. | ||
|
||
1. Install [Docker](https://docs.docker.com/get-docker/) | ||
2. Install [Docker Compose](https://docs.docker.com/compose/install/) | ||
3. Run `docker-compose up --build -d` in the root directory. | ||
|
||
This should launch a new CouchDB instance on `http://localhost:5984`, create system database, configure CouchDB as Single Node, enable CORS, create `hospitalrun` database, create a default admin with a username of `admin` and password of 'password' | ||
|
||
4. Make the `hospitalrun` database a public database by removing its member permissions: | ||
|
||
``` | ||
curl -X PUT http://admin:password@localhost:5984/hospitalrun/_security -d '{"members": {}, "admins": {"roles": ["_admin"] }}' | ||
``` | ||
5. Create a sample user with a username of `username` and password of 'password' to use new login page [#2137](https://github.com/HospitalRun/hospitalrun-frontend/pull/2137) | ||
``` | ||
curl -X PUT http://admin:password@localhost:5984/_users/org.couchdb.user:username -H "Accept: application/json" -H "Content-Type: application/json" -d '{"name": "username", "password": "password", "metadata": { "givenName": "John", "familyName": "Doe"}, "roles": [], "type": "user"}' | ||
``` | ||
6. Launch `http://localhost:5984/_utils` to view Fauxton and perform administrative tasks. | ||
**_Cleanup_** | ||
To delete the development database, go to the root of the project and run `docker-compose down -v --rmi all --remove-orphans` | ||
### Install dependencies & start the application | ||
1. Install dependencies: `npm install` | ||
2. Configure `REACT_APP_HOSPITALRUN_API=http://localhost:5984` environment variable in `.env` | ||
3. Run the application `npm start` | ||
## Online one-click setup for contributing | ||
|
@@ -96,13 +133,14 @@ Before submitting a request, please search for similar ones in the | |
## Pull Requests | ||
1. Ensure any install or build dependencies are removed before the end of the layer when doing a | ||
1. **Don't open the PR until it's ready for review. We need to optimize build time.** | ||
2. Ensure any install or build dependencies are removed before the end of the layer when doing a | ||
build. | ||
2. Update the README.md with details of changes to the interface, this includes new environment | ||
3. Update the README.md with details of changes to the interface, this includes new environment | ||
variables, exposed ports, useful file locations and container parameters. | ||
3. Increase the version numbers in any examples files and the README.md to the new version that this | ||
4. Increase the version numbers in any examples files and the README.md to the new version that this | ||
Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). | ||
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you | ||
5. You may merge the Pull Request in once you have the sign-off of two other developers, or if you | ||
do not have permission to do that, you may request the second reviewer to merge it for you. | ||
## Contributor License Agreement | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.