Skip to content

Commit e6df97d

Browse files
committed
About docker-compose overrides for oauth
1 parent b47971b commit e6df97d

File tree

1 file changed

+34
-4
lines changed

1 file changed

+34
-4
lines changed

README.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,16 @@ To stop and remove:
3232

3333
docker-compose down
3434

35-
If you change the source code, re-build with `docker-compose build`.
35+
If you change the source code, then use this `docker-compose.override.yml` and
36+
re-build with `docker-compose build`:
37+
38+
```yaml
39+
version: '2'
40+
services:
41+
spring:
42+
build: .
43+
```
44+
3645
3746
See the [docker-compose.yml](docker-compose.yml) file for details.
3847
@@ -53,15 +62,36 @@ If you have modified the source code, then you may want to build the docker imag
5362
You will need to have [MongoDB](https://www.mongodb.com/) running,
5463
by default on `localhost:27017`.
5564

56-
(You can override this by supplying system properties like
57-
`-Dspring.data.mongodb.host=mongo` or `-Dspring.data.mongodb.port=1337`)
65+
If you are running from the command line, you can override this by supplying
66+
system properties like `-Dspring.data.mongodb.host=mongo.example.org` and
67+
`-Dspring.data.mongodb.port=1337`
5868

5969
If you have Docker, but are not using the Docker Compose method above,
6070
you may start MongoDB with [Docker](https://www.docker.com/) using:
6171

6272
docker run --name cwlviewer-mongo -p 27017:27017 -d mongo
6373

64-
Note that this exposes mongodb to the world on port `27017`.
74+
**WARNING**: The above expose mongodb to the world on port `27017`.
75+
76+
## GitHub OAuth2 tokens
77+
78+
If you run cwlviewer in production, you are likely to hit the GitHub API's rate limit of 500.
79+
80+
You can override this if you obtain an [OAuth token](https://developer.github.com/v3/oauth_authorizations/),
81+
which you can configure cwlviewer to use by creating/modifying `docker-compose.override.yml`:
82+
83+
```yaml
84+
version: '2'
85+
services:
86+
spring:
87+
environment:
88+
githubAPI.authentication: oauth
89+
githubAPI.oauthToken: abcdefghhijklmnopqrstuvwxyz
90+
```
91+
92+
The properties can alternatively be provided as system properties on the
93+
command line, e.g. `-DgithubAPI.authentication=oauth`
94+
`-DgithubAPI.oauthToken=abcdefghhijklmnopqrstuvwxyz`
6595

6696

6797
## Building and Running

0 commit comments

Comments
 (0)