-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
96 lines (92 loc) · 2.78 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
version: "2.4"
services:
postgres:
image: postgres:10.1-alpine
restart: unless-stopped
environment:
- POSTGRES_DB=kong
- POSTGRES_USER=kong
healthcheck:
test: ["CMD", "pg_isready"]
start_period: 3s
timeout: 5s
retries: 3
cassandra:
image: cassandra:3.11
restart: unless-stopped
environment:
- CASSANDRA_CLUSTER_NAME=kong
- CASSANDRA_DC=DC1
- CASSANDRA_RACK=RACK1
- CASSANDRA_ENDPOINT_SNITCH=GossipingPropertyFileSnitch
healthcheck:
test: ["CMD", "cqlsh", "cassandra"]
start_period: 5s
timeout: 5s
retries: 3
migrator:
build: .
image: rucciva/kong-plugin-oauth2-audience
restart: on-failure
depends_on:
postgres:
condition: service_healthy
cassandra:
condition: service_healthy
environment:
- KONG_PG_HOST=postgres
- KONG_PG_DATABASE=kong
- KONG_CASSANDRA_CONTACT_POINTS=cassandra
- KONG_CASSANDRA_DATA_CENTERS=DC1:1
- KONG_CASSANDRA_REPL_STRATEGY=NetworkTopologyStrategy
- KONG_CASSANDRA_LOCAL_DATACENTER=DC1
command:
- /bin/bash
- -c
- KONG_DATABASE=postgres kong migrations bootstrap &&
KONG_DATABASE=cassandra kong migrations bootstrap
kong:
build: .
image: rucciva/kong-plugin-oauth2-audience
restart: unless-stopped
depends_on:
migrator:
condition: service_started
environment:
- KONG_DATABASE=postgres
- KONG_PG_HOST=postgres
- KONG_ADMIN_LISTEN=0.0.0.0:8001
- KONG_TRUSTED_IPS=0.0.0.0/0,::/0
ports:
- 8000:8000
- 8443:8443
- 8001:8001
- 8444:8444
volumes:
- ./volumes/kong/usr/local/share/lua/5.1:/usr/local/share/lua/5.1
- ./volumes/kong/prefix:/prefix
busted:
build: .
image: rucciva/kong-plugin-oauth2-audience
depends_on:
migrator:
condition: service_started
environment:
- SPEC_KONG_PG_HOST=postgres
- SPEC_KONG_PG_DATABASE=kong
- SPEC_KONG_CASSANDRA_CONTACT_POINTS=cassandra
- SPEC_KONG_CASSANDRA_DATA_CENTERS=DC1:1
- SPEC_KONG_CASSANDRA_REPL_STRATEGY=NetworkTopologyStrategy
- SPEC_KONG_CASSANDRA_LOCAL_DATACENTER=DC1
- SPEC_KONG_LOG_LEVEL=info
- SPEC_KONG_DNS_RESOLVER=
- SPEC_KONG_PROXY_ACCESS_LOG=/proc/1/fd/1
- SPEC_KONG_PROXY_ERROR_LOG=/proc/1/fd/2
- SPEC_KONG_ADMIN_ACCESS_LOG=/proc/1/fd/1
- SPEC_KONG_ADMIN_ERROR_LOG=/proc/1/fd/2
volumes:
- ./kong/plugins/oauth2-audience:/usr/local/src/kong/kong/plugins/oauth2-audience
- ./spec/oauth2-audience:/usr/local/src/kong/spec/oauth2-audience
# - ./volumes/busted/usr/local/src/kong/servroot:/usr/local/src/kong/servroot
working_dir: /usr/local/src/kong/
command: bin/busted -v spec/oauth2-audience