Skip to content

Commit fdbd459

Browse files
authored
Merge pull request #757 from CaitlinOCallaghan/newREADME
#753 Update README in master branch
2 parents 9b7f5ab + ecfe8a9 commit fdbd459

File tree

1 file changed

+87
-2
lines changed

1 file changed

+87
-2
lines changed

README.md

Lines changed: 87 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,28 @@
55

66
- [Node.js](https://nodejs.org/en/) >=6.3.0
77

8+
## Running the App Locally
9+
1. Install rethinkdb and run it by typing the command in your terminal
10+
```
11+
rethinkdb
12+
```
13+
2. Install the project dependencies by typing:
14+
```
15+
npm install
16+
```
817

18+
3. Run the project using one of the defined package scripts:
19+
20+
For development:
21+
```
22+
npm run watch
23+
```
24+
25+
For a production build:
26+
```
27+
npm run build-prod
28+
npm run start
29+
```
930

1031
## Configuration
1132

@@ -18,7 +39,7 @@ The following environment variables can be used to configure the server:
1839
1. Download [RethinkDB](https://www.rethinkdb.com/docs/install/)
1940
2. Start your RethinkDB server by following the steps [here](https://www.rethinkdb.com/docs/start-a-server/)
2041
3. Go to `src/server/database/config.js` and modify the ip field to match your server address
21-
4. Start the project : `npm run start` or `npm run watch`, then the server will auto create all the required tables for you.
42+
4. Start the project : `npm run start` or `npm run watch`, then the server will auto create all the required tables for you.
2243

2344

2445
## Run targets
@@ -36,6 +57,8 @@ The following environment variables can be used to configure the server:
3657

3758
## Running via Docker
3859

60+
### Build and run directly
61+
3962
Build the container. Here, `app-ui` is used as the container name.
4063

4164
```
@@ -61,6 +84,22 @@ Notes:
6184
- [Docker CLI docs](https://docs.docker.com/engine/reference/commandline/cli/)
6285

6386

87+
### Run image hosted on Docker Hub using Docker Compose
88+
89+
Pathway Commons maintains a [Docker Hub](https://hub.docker.com/) image for [app-ui](https://hub.docker.com/r/pathwaycommons/app-ui/) that is automatically built each time a commit is pushed to GitHub.
90+
91+
To run the GitHub development branch:
92+
93+
```sh
94+
docker-compose --file docker-compose.yml up --detach
95+
```
96+
97+
Access the app instance at port `9090`.The default configuration declared in `docker-compose.yml` also runs a [rethinkdb](https://hub.docker.com/_/rethinkdb/) image; access the UI at port `8020`.
98+
99+
Notes:
100+
- References:
101+
- [Getting started with Docker Compose](https://docs.docker.com/compose/gettingstarted/)
102+
64103

65104
## Testing
66105

@@ -69,6 +108,53 @@ All files `/test` will be run by [Mocha](https://mochajs.org/). You can `npm te
69108
[Chai](http://chaijs.com/) is included to make the tests easier to read and write.
70109

71110

111+
## Devloping a feature and making a pull request
112+
113+
Students who work on the repo should follow these instructions for each feature that they work on:
114+
115+
1. Initial prepartion (only needed once)
116+
1. [Make a fork on Github](https://github.com/PathwayCommons/app-ui#fork-destination-box) (if you haven't already) under your personal account
117+
1. Check out the fork repo: `git clone https://github.com/myusername/app-ui.git`
118+
1. Change the directory to the project: `cd app-ui`
119+
1. Check out the `development` branch: `git checkout -b development origin/development`
120+
1. Add the `pc` remote: `git remote add pc https://github.com/PathwayCommons/app-ui.git`
121+
1. Make sure you have the latest code on the main PathwayCommons repo:
122+
1. Using the console: `git fetch pc`
123+
1. Or using GitUp: `Remotes > Fetch All Branches`, `Remotes > Fetch All Tags`
124+
1. Make sure your `development` branch is up-to-date:
125+
1. Using the console: `git checkout development && git merge pc/development`
126+
1. Using GitUp:
127+
1. Right-click the commit that `pc/development` points to
128+
1. Select `Merge into Current Branch`
129+
1. Make a feature branch for the new feature or change you are working on. Make sure to give your branch a clear, meaningful name.
130+
1. Using the console: `git checkout -b name-of-feature`
131+
1. Using GitUp: Right click the `HEAD` commit (which should be the top commit of your local `development` branch), then select `Create Branch...`
132+
1. Make commits as you're working on your feature:
133+
1. Using the console: `git commit -am "My descriptive commit message"`
134+
1. Using GitUp: Use the `Select View` tab (`View > Commit`)
135+
1. Stage the files
136+
1. Add a descriptive commit message
137+
1. Press the `Commit` button
138+
1. Periodically (at least once just before making a pull request) make sure your feature branch takes into account the latest changes other people have made:
139+
1. Make sure your `development` branch is up-to-date:
140+
1. Using the console: `git checkout development && git merge pc/development`
141+
1. Using GitUp:
142+
1. Right-click the commit that `pc/development` points to
143+
1. Select `Merge into Current Branch
144+
1. Make sure your feature branch is up-to-date:
145+
1. Using the console: `git checkout name-of-feature`, `git merge development`
146+
1. Using GitUp:
147+
1. Make sure your `HEAD` is the newest commit of your feature branch: Right-click the latest commit on `name-of-feature` branch and select `Checkout "name-of-feature" Branch`
148+
1. Right-click the latest commit of the `development` branch and select `Merge into Current Branch`
149+
1. Push your commits to GitHub:
150+
1. Note: You can push as often as you'd like so that your code is backed up on GitHub. You *must* push everything before you make a pull request.
151+
1. Using the console: `git push`
152+
1. Using GitUp: `Remotes > Push Current Branch`
153+
1. When your feature is done and ready to be reviewed, make a pull request:
154+
1. Go to your fork on GitHub, e.g. https://github.com/myusername/app-ui
155+
1. Select your feature branch
156+
1. Click the `New pull request` button
157+
1. Give your pull request a clear title and a meaningful description
72158

73159
## Publishing a release
74160

@@ -80,4 +166,3 @@ All files `/test` will be run by [Mocha](https://mochajs.org/). You can `npm te
80166
1. For a breaking API change, run `npm version major.`
81167
1. For a specific version number (e.g. 1.2.3), run `npm version 1.2.3`.
82168
1. Push the release: `git push origin --tags`
83-

0 commit comments

Comments
 (0)