-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
68 lines (68 loc) · 1.49 KB
/
docker-compose.yaml
File metadata and controls
68 lines (68 loc) · 1.49 KB
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
version: "3.8"
services:
envoy:
image: docker.io/envoyproxy/envoy:v1.26-latest
command:
- envoy
- "--log-level"
- warn
- "--config-path"
- /config/envoy.yaml
deploy:
replicas: 1
configs:
- source: envoy_config
target: /config/envoy.yaml
mode: 0444
ports:
- 8080:8080
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/ping"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
opa:
image: docker.io/openpolicyagent/opa:0.54.0-envoy-static
user: "1111:1111"
command:
- run
- "--log-level=error"
- "--server"
- "--config-file=/config/opa.yaml"
- "--addr=localhost:8181"
- "--diagnostic-addr=localhost:8282"
- /policy/
environment:
- OPENAI_API_KEY
- EXAMPLE_APP_JWT_SECRET
deploy:
replicas: 1
expose:
- 9191/tcp
configs:
- source: opa_config
target: /config/opa.yaml
mode: 0444
- source: opa_policies
target: /policy/
mode: 0444
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8282/health?plugins"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
example-app:
build: ./example-app
ports:
- 3000:3000
environment:
- EXAMPLE_APP_JWT_SECRET
configs:
envoy_config:
file: ./config/envoy.yaml
opa_config:
file: ./config/opa.yaml
opa_policies:
file: ./config