Skip to content

Commit 7686131

Browse files
authored
Merge pull request #7 from Intellection/update_readme
Update README with better example usage
2 parents 771c2b9 + 23b1620 commit 7686131

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

README.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,27 @@
22

33
[![CircleCI](https://circleci.com/gh/Intellection/docker-oauth2-proxy/tree/master.svg?style=shield)](https://circleci.com/gh/Intellection/docker-oauth2-proxy/tree/master)
44

5-
This is a small docker image for `oauth2_proxy` which is a reverse proxy
6-
that provides authentication with Google, GitHub or other providers.
5+
This is a small docker image for `oauth2_proxy` which is a reverse proxy that provides authentication with Google, GitHub or other providers.
76

87
## Configuration
98

10-
Configure OAuth2 Proxy using config file, command line options, or
11-
environment variables. See [`bitly/oauth2_proxy` documentation][1] for
12-
more details.
9+
Configure OAuth2 Proxy using [config file][2], [command line options][3], or [environment variables][4]. See [`bitly/oauth2_proxy` documentation][1] for more details.
1310

1411
## Usage
1512

16-
Run without parameters or any configuration:
13+
Protect an upstream service e.g. `http://someservice:1234` using Google as the provider (default) but limited to `yourdomain.com` email addresses:
1714

18-
# Will error out because of no configuration
19-
$ docker run zappi/oauth2_proxy
20-
2016/09/16 10:19:26 main.go:99: Invalid configuration:
21-
missing setting: upstream
22-
missing setting: cookie-secret
23-
missing setting: client-id
24-
missing setting: client-secret
25-
missing setting for email validation: email-domain or authenticated-emails-file required.
26-
use email-domain=* to authorize all email addresses
27-
28-
Check version:
29-
30-
$ docker run zappi/oauth2_proxy --version
15+
$ docker run \
16+
-p 4180:4180 \
17+
-e OAUTH2_PROXY_CLIENT_ID="SOME_CLIENT_ID" \
18+
-e OAUTH2_PROXY_CLIENT_SECRET="SOME_CLIENT_SECRET" \
19+
-e OAUTH2_PROXY_COOKIE_SECRET="SOME_COOKIE_SECRET" \
20+
zappi/oauth2_proxy:2.1 \
21+
-—upstream=http://someservice:1234 \
22+
-—http-address=0.0.0.0:4180 \
23+
-—email-domain=yourdomain.com
3124

3225
[1]: https://github.com/bitly/oauth2_proxy
26+
[2]: https://github.com/bitly/oauth2_proxy/tree/v2.1#config-file
27+
[3]: https://github.com/bitly/oauth2_proxy/tree/v2.1#command-line-options
28+
[4]: https://github.com/bitly/oauth2_proxy/tree/v2.1#environment-variables

0 commit comments

Comments
 (0)