You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-5Lines changed: 17 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,21 +32,33 @@ Microservice to manage CRUD operations for all things Projects.
32
32
*NOTE: In production these dependencies / services are hosted & managed outside tc-projects-service.*
33
33
34
34
* Local config
35
+
36
+
There are two prepared configs:
37
+
- if you have M2M environment variables provided: `AUTH0_CLIENT_ID`, `AUTH0_CLIENT_SECRET`, `AUTH0_URL`, `AUTH0_AUDIENCE` then use `config/m2m.local.js`
38
+
- otherwise use `config/mock.local.js`.
39
+
40
+
To apply any of these config copy it to `config/local.js`:
41
+
35
42
```bash
36
-
# in the tc-project-service root folder, not inside local/ as above
37
-
cp config/sample.local.js config/local.js
43
+
cp config/mock.local.js config/local.js
44
+
# or
45
+
cp config/m2m.local.js config/local.js
38
46
```
39
-
Copy `config/sample.local.js` as `config/local.js`.<br>
40
-
As project service depend on many third-party services we have to config how to access them. Some services are run locally and some services are used from Topcoder DEV environment. `config/local.js` has a prepared configuration which would replace values no matter what `NODE_ENV` value is.
41
47
42
-
**IMPORTANT** This configuration file assumes that services run by docker use domain `dockerhost`. Depend on your system you have to make sure that domain `dockerhost` points to the IP address of docker.
48
+
`config/local.js` has a prepared configuration which would replace values no matter what `NODE_ENV` value is.
49
+
50
+
**IMPORTANT** These configuration files assume that docker containers are run on domain `dockerhost`. Depend on your system you have to make sure that domain `dockerhost` points to the IP address of docker.
43
51
For example, you can add a the next line to your `/etc/hosts` file, if docker is run on IP `127.0.0.1`.
44
52
```
45
53
127.0.0.1 dockerhost
46
54
```
47
55
Alternatively, you may update `config/local.js` and replace `dockerhost` with your docker IP address.<br>
48
56
You may try using command `docker-machine ip` to get your docker IP, but it works not for all systems.
49
57
58
+
Explanation of configs:
59
+
-`config/mock.local.js` - Use local `mock-services` from docker to mock Identity and Member services instead of using deployed at Topcoder dev environment.
60
+
-`config/m2m.local.js` - Use Identity and Member services deployed at Topcoder dev environment. This can be used only if you have M2M environment variables (`AUTH0_CLIENT_ID`, `AUTH0_CLIENT_SECRET`, `AUTH0_URL`, `AUTH0_AUDIENCE`) provided to access Topcoder DEV environment services.
0 commit comments