-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathdocker-compose.yml
139 lines (138 loc) · 2.66 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
version: '3'
services:
spire-server:
build: ./docker/spire-server
hostname: spire-server
tty: true
privileged: true
networks:
envoymesh:
aliases:
- spire-server
db:
build: ./docker/db
hostname: db
tty: true
privileged: true
networks:
envoymesh:
aliases:
- db
backend:
build: ./docker/backend
hostname: backend
tty: true
privileged: true
networks:
envoymesh:
aliases:
- backend
web:
build: ./docker/web
hostname: web
tty: true
privileged: true
networks:
static-network-1:
ipv4_address: 172.28.1.2
static-network-2:
ipv4_address: 192.28.1.2
envoymesh:
aliases:
- web
expose:
- "8001"
ports:
- "8001:8001"
opa_web:
image: openpolicyagent/opa:0.10.7-envoy
volumes:
- ./docker/web/opa/policies:/policies
- ./docker/web/opa/config:/config
command:
- --plugin-dir=.
- run
- --server
- --log-level=debug
- --config-file=/config/config.yaml
- /policies/policy.rego
networks:
envoymesh:
aliases:
- opa_web
expose:
- "9191"
ports:
- "9191:9191"
opa_be:
image: openpolicyagent/opa:0.10.7-envoy
volumes:
- ./docker/backend/opa/policies:/policies
- ./docker/backend/opa/config:/config
command:
- --plugin-dir=.
- run
- --server
- --log-level=debug
- --config-file=/config/config.yaml
- /policies/policy.rego
networks:
envoymesh:
aliases:
- opa_be
expose:
- "9192"
ports:
- "9192:9192"
opa_db:
image: openpolicyagent/opa:0.10.7-envoy
volumes:
- ./docker/db/opa/policies:/policies
- ./docker/db/opa/config:/config
command:
- --plugin-dir=.
- run
- --server
- --log-level=debug
- --config-file=/config/config.yaml
- /policies/policy.rego
networks:
envoymesh:
aliases:
- opa_db
expose:
- "9193"
ports:
- "9193:9193"
api-server-1:
build:
context: ./docker/api-server
networks:
static-network-1:
ipv4_address: 172.28.1.1
expose:
- "5000"
ports:
- "5000:5000"
api-server-2:
build:
context: ./docker/api-server
networks:
static-network-2:
ipv4_address: 192.28.1.1
expose:
- "5001"
ports:
- "5001:5000"
networks:
envoymesh: {}
static-network-1:
ipam:
driver: default
config:
- subnet: 172.28.0.0/16
static-network-2:
ipam:
driver: default
config:
- subnet: 192.28.0.0/16