Skip to content

Commit 202ca06

Browse files
authored
Merge pull request #13 from TaskarCenterAtUW/onboarding-john-bee
Adding section to README for local development
2 parents ff8978e + be9ee0e commit 202ca06

File tree

1 file changed

+47
-2
lines changed

1 file changed

+47
-2
lines changed

README.md

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ See GitHub's actions tab in this repo for more deployment examples/steps.
3030

3131
# Getting Started
3232

33-
### To build images
33+
### To build images for deploy
3434

3535
```git clone --recursive https://github.com/TaskarCenterAtUW/workspaces-stack.git```
3636

@@ -49,5 +49,50 @@ Replace XXX.env with the environment definition file of the environment for whic
4949
### Other Files
5050

5151
* ```example.env```: template of the .env file required by the Docker compose YAML files
52-
* ```tdei_uw.env```: .env for deployment at UW's TDEI center. Only UW should use this, new users should adapt example.env to suit their needs. LTG: remove this file from this repo.
52+
* ```tdei_uw.env```: .env for deployment at UW's TDEI center. Only UW should use this, new users should adapt example.env to suit their needs. LTG: remove this file from this repo.
5353

54+
# Local Development
55+
56+
### To build images for local development
57+
58+
You will need access to prepopulated .env files that are not in version control. Specifically local.dev.env for the rest of these steps, which is assumed to be found in the workspaces-stack root directory.
59+
60+
Add (or merge) the following to your ```/etc/hosts``` file:
61+
```127.0.0.1 localhost workspaces.local api.workspaces.local rapid.workspaces.local osm.workspaces.local pathways.workspaces.local tasks.workspaces.local```
62+
63+
You will also need to increase the total amount of system memory available to Docker containers to 10+ GB. In Docker Desktop you find this in Settings -> Resources -> Memory Limit.
64+
65+
```git clone --recursive https://github.com/TaskarCenterAtUW/workspaces-stack.git```
66+
67+
Comment out the ```osm-log-proxy``` section from ```docker-compose.yml``` as aggregate logging is not available locally.
68+
69+
```docker-compose build```
70+
71+
```cp local.dev.env .env```
72+
73+
```docker-compose up -d```
74+
75+
Now we are ready to finalize configuration on each container.
76+
77+
```docker-compose run --rm --entrypoint=bash frontend```
78+
```npm i```
79+
```exit```
80+
81+
```docker-compose run --rm --entrypoint=bash rapid```
82+
```npm i```
83+
```exit```
84+
85+
```docker-compose run --rm --entrypoint=bash pathways-editor```
86+
```npm i```
87+
```exit```
88+
89+
```docker-compose run --rm --entrypoint=bash osm-rails```
90+
```cp /config/example.storage.yml /config/storage.yml```
91+
```bundle install```
92+
```exit```
93+
94+
Note that there are two different ways to run individual containers depending on your dev context.
95+
96+
Using the frontend container as an example:
97+
* To debug / step through run ```docker-compose run --rm frontend```
98+
* To run while working on another service run ```docker-compose up -d frontend```

0 commit comments

Comments
 (0)