@@ -0,0 +1,64 @@
1+# This docker-compose file can be used to bring up an example instance of oauth2-proxy
2+# for manual testing and exploration of features.
3+# Alongside OAuth2-Proxy, this file also starts Dex to act as the identity provider,
4+# etcd for storage for Dex and HTTPBin as an example upstream.
5+#
6+# This can either be created using docker-compose
7+# docker-compose -f docker-compose.yaml <command>
8+# Or:
9+# make <command> (eg. make up, make down)
10+#
11+# Access http://localhost:4180 to initiate a login cycle
12+version: '3.0'
13+services:
14+ oauth2-proxy:
15+ container_name: oauth2-proxy
16+ image: quay.io/oauth2-proxy/oauth2-proxy:v5.1.1
17+ command: --config /oauth2-proxy.cfg
18+ ports:
19+ - 4180:4180/tcp
20+ hostname: oauth2-proxy
21+ volumes:
22+ - "./oauth2-proxy.cfg:/oauth2-proxy.cfg"
23+ restart: unless-stopped
24+ networks:
25+ dex: {}
26+ httpbin: {}
27+ depends_on:
28+ - dex
29+ - httpbin
30+ dex:
31+ container_name: dex
32+ image: quay.io/dexidp/dex:v2.23.0
33+ command: serve /dex.yaml
34+ ports:
35+ - 4190:4190/tcp
36+ hostname: dex
37+ volumes:
38+ - "./dex.yaml:/dex.yaml"
39+ restart: unless-stopped
40+ networks:
41+ dex:
42+ aliases:
43+ - dex.localhost
44+ etcd: {}
45+ depends_on:
46+ - etcd
47+ httpbin:
48+ container_name: httpbin
49+ image: kennethreitz/httpbin
50+ networks:
51+ httpbin: {}
52+ etcd:
53+ container_name: etcd
54+ image: gcr.io/etcd-development/etcd:v3.4.7
55+ entrypoint: /usr/local/bin/etcd
56+ command:
57+ - --listen-client-urls=http://0.0.0.0:2379
58+ - --advertise-client-urls=http://etcd:2379
59+ networks:
60+ etcd: {}
61+networks:
62+ dex: {}
63+ etcd: {}
64+ httpbin: {}