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

Documents for Docker-compose #1043

Merged
merged 6 commits into from
Apr 5, 2017
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ To install the frontend please do the following:
3. Install [ember-cli latest](https://www.npmjs.org/package/ember-cli): `npm install -g ember-cli@latest`.
Depending on your [npm permissions](https://docs.npmjs.com/getting-started/fixing-npm-permissions) you might need root access to install ember-cli.
4. Install [bower](https://www.npmjs.org/package/bower): `npm install -g bower`
5. Clone this repo with `git clone https://github.com/HospitalRun/hospitalrun-frontend`, go to the cloned folder and run `script/bootstrap`.
5. Fork the master repository from `https://github.com/HospitalRun/hospitalrun-frontend` and clone the forked repository.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why the change here. For some folks cloning is all they will need to do.

6. Go to the cloned folder and run `script/bootstrap`.
- **Note:** *Depending on your [npm permissions](https://docs.npmjs.com/getting-started/fixing-npm-permissions) you might need root access to install PhantomJS2; also, Windows users must run with [Cygwin](http://cygwin.org/)).*
- **Note:** *If you just want to use the project, cloning is the best option. However, if you wish to contribute to the project, you will need to fork the project first, and then clone your `hospitalrun-frontend` fork and make your contributions via a branch on your fork.*
6. Install and configure [CouchDB](http://couchdb.apache.org/)
7. Install and configure [CouchDB](http://couchdb.apache.org/)
1. Download and install CouchDB from http://couchdb.apache.org/#download
2. Start CouchDB
1. If you downloaded the installed app, navigate to CouchDB and double-click on the application.
Expand All @@ -53,8 +54,8 @@ To install the frontend please do the following:
2. If you are running CouchDB 2.x
1. If you have just installed CouchDB and have no admin user, please run `./script/initcouch2.sh` in the folder you cloned the HospitalRun repo. A user `hradmin` will be created with password: `test`.
2. If you already have a CouchDB admin user, please run `./script/initcouch2.sh USER PASS` in the folder you cloned the HospitalRun repo. `USER` and `PASS` are the CouchDB admin user credentials.
7. Copy the `server/config-example.js` to `server/config.js` in the folder you cloned the HospitalRun repo. If you already had a CouchDB admin user that you passed into the couch script (`./script/initcouch.sh USER PASS`), then you will need to modify the `couchAdminUser` and `couchAdminPassword` values in `server/config.js` to reflect those credentials. (*Note: If on Mac, you need to make sure CouchDB can be run. See [How to open an app from a unidentified developer and exempt it from Gatekeeper](https://support.apple.com/en-us/HT202491).*)
8. Verify that CouchDB is running by visiting: http://127.0.0.1:5984/_utils/#login
8. Copy the `server/config-example.js` to `server/config.js` in the folder you cloned the HospitalRun repo. If you already had a CouchDB admin user that you passed into the couch script (`./script/initcouch.sh USER PASS`), then you will need to modify the `couchAdminUser` and `couchAdminPassword` values in `server/config.js` to reflect those credentials. (*Note: If on Mac, you need to make sure CouchDB can be run. See [How to open an app from a unidentified developer and exempt it from Gatekeeper](https://support.apple.com/en-us/HT202491).*)
9. Verify that CouchDB is running by visiting: http://127.0.0.1:5984/_utils/#login
and logging in with the with the credentials you just created from steps 6 and 7.
1. If you the page returns an error or 404:
1. Run `make serve`, it will start couchdb, install npm dependencies and start the server.
Expand All @@ -75,13 +76,16 @@ To run HospitalRun with Docker please do the following:
- Build the HospitalRun image with `docker build -t hospitalrun-frontend .`
- Execute `docker run -it --name couchdb -d couchdb` to create the couchdb container.
- Execute `docker run -it --name hospitalrun-frontend -p 4200:4200 --link couchdb:couchdb -d hospitalrun-frontend` to create the HospitalRun container.
or instead,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way this is formatted it isn't immediately clear that it is a different way to accomplish Running with Docker. I suggest breaking the Running With Docker into two sub sections, eg:
##Running With Docker
###Running With Docker Engine
Existing information here
###Running with Docker Compose
Your new info here

- Go to [https://docs.docker.com/compose/install](https://docs.docker.com/compose/install/) to install Docker-compose
- Execute 'docker-compose up' to reduce the steps to build and run the application.

### Accessing HospitalRun with Docker Toolbox
If you are running with Docker Toolbox you will have to run the following commands to get the IP of the docker machine where hospitalrun-frontend is running with the following:
- Run the following command to get the ip of the docker machine that the image was created on `docker-machine ip default`.
- Go to `http://<docker-machine ip>:4200` in a browser and login with username `hradmin` and password `test`.

### Accessing HospitalRun with Docker
### Accessing HospitalRun with Docker or Docker-compose
If you are not running with docker toolbox please do the following:
- Go to `http://localhost:4200` in a browser and login with username `hradmin` and password `test`.

Expand Down Expand Up @@ -145,7 +149,7 @@ Again, contributions are welcome via pull requests and issues. Please see our [
**Seriously, please read the [Contribution Guide](https://github.com/hospitalrun/hospitalrun-frontend/blob/master/.github/CONTRIBUTING.md).**

## Start Coding
To start coding and understand the frameworks, concepts and structure of the project, please read:
To start coding and understand the frameworks, concepts and structure of the project, please read:
[Contribution Guide: Start Coding](.github/CONTRIBUTING.md#start-coding).

## Further Reading / Useful Links
Expand Down