-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
218 lines (204 loc) · 5.95 KB
/
docker-compose.yaml
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
name: sensorbucket
services:
caddy:
image: caddy:alpine
command: ["caddy", "run", "--watch", "--config", "/etc/caddy/Caddyfile"]
ports:
- 3000:80
volumes:
- ./tools/docker-compose/caddy:/etc/caddy
dashboard:
build:
context: .
dockerfile: services/dashboard/Dockerfile
target: dev
volumes:
- .:/workspace:cached
environment:
- STATIC_PATH=services/dashboard/static
- HTTP_BASE=/dashboard
- HEALTH_ADDR=:3030
- EP_CORE=http://caddy/api
- EP_TRACING=http://caddy/api
- EP_WORKERS=http://caddy/api
- PROFILER_ADDR=:3100
core:
build:
context: .
dockerfile: Dockerfile
target: dev
volumes:
- .:/workspace:cached
environment:
- APP_NAME=core
- APP_TYPE=service
- DB_DSN=postgresql://sensorbucket:sensorbucket@db:5432/sensorbucket?sslmode=disable
- HTTP_ADDR=:3000
- AMQP_HOST=amqp://guest:guest@mq:5672/
- PROFILER_ADDR=:3100
- HEALTH_ADDR=:3030
tracing:
build:
context: .
dockerfile: Dockerfile
target: dev
volumes:
- .:/workspace:cached
environment:
- APP_NAME=tracing
- APP_TYPE=service
- DB_DSN=postgresql://sensorbucket:sensorbucket@db:5432/tracing?sslmode=disable
- AMQP_HOST=amqp://guest:guest@mq:5672/
- AMQP_QUEUE_PIPELINEMESSAGES=pipeline.messages
- AMQP_QUEUE_ERRORS=errors
- AMQP_QUEUE_INGRESS=archive-ingress
- AMQP_XCHG_INGRESS=ingress
- AMQP_XCHG_INGRESS_TOPIC=ingress.#
- PROFILER_ADDR=:3100
- HEALTH_ADDR=:3030
tenants:
build:
context: .
dockerfile: services/tenants/Dockerfile
target: dev
volumes:
- .:/workspace:cached
environment:
- DB_DSN=postgresql://sensorbucket:sensorbucket@db:5432/tenants?sslmode=disable
- STATIC_PATH=services/tenants/static
- HTTP_WEBUI_BASE=/tenants
- KRATOS_ADMIN_API=http://kratos:4434
- KRATOS_SERVER_API=http://127.0.0.1:3000/.ory
- PROFILER_ADDR=:3100
- HEALTH_ADDR=:3030
userworkers:
build:
context: .
dockerfile: Dockerfile
target: dev
volumes:
- .:/workspace:cached
- /var/run/docker.sock:/var/run/docker.sock
environment:
- APP_NAME=fission-user-workers
- APP_TYPE=service
- HTTP_ADDR=:3000
- HEALTH_ADDR=:3030
- DB_DSN=postgresql://sensorbucket:sensorbucket@db:5432/userworkers?sslmode=disable
- PROFILER_ADDR=:3100
- WORKER_NAMESPACE=default
- AMQP_XCHG=pipeline.messages
- CTRL_TYPE=docker
#- CTRL_K8S_CONFIG=/workspace/tools/kube/config
#- CTRL_K8S_MQT_IMAGE=
#- CTRL_K8S_MQT_SECRET=
#- CTRL_K8S_PULL_SECRET=
#- CTRL_DOCKER_WORKERS_EP="http://caddy/api/workers"
- CTRL_DOCKER_WORKER_IMAGE=sensorbucket/docker-worker:latest
#- CTRL_DOCKER_AMQP_HOST=
#- CTRL_DOCKER_AMQP_XCHG=
#- CTRL_DOCKER_ENDPOINT_DEVICES=
#- CTRL_DOCKER_WORKER_NET=
# This container should only build, the userworkers service will start containers of this
# image for every created worker
userworkers_dockerworker:
image: sensorbucket/docker-worker:latest
build:
context: ./services/fission-user-workers/service/dockerworker
dockerfile: Dockerfile
entrypoint: sleep 1
httpimporter:
build:
context: .
dockerfile: Dockerfile
target: dev
volumes:
- .:/workspace:cached
environment:
- APP_NAME=httpimporter
- APP_TYPE=service
- HTTP_ADDR=:3000
- AMQP_HOST=amqp://guest:guest@mq:5672/
- AMQP_XCHG=ingress
- AMQP_XCHG_TOPIC=ingress.httpimporter
- PROFILER_ADDR=:3100
- HEALTH_ADDR=:3030
mqttingress:
build:
context: .
dockerfile: Dockerfile
target: dev
ports:
- "1883:1883"
volumes:
- .:/workspace:cached
environment:
- APP_NAME=mqtt-ingress
- APP_TYPE=service
- "APIKEY_TRADE_URL=http://oathkeeper:4456/decisions/"
- AMQP_HOST=amqp://guest:guest@mq:5672/
- AMQP_XCHG=ingress
- AMQP_XCHG_TOPIC=ingress.mqtt
- PROFILER_ADDR=:3100
- METRICS_ADDR=:2112
- HEALTH_ADDR=:3030
oathkeeper:
image: oryd/oathkeeper:v0.40.6
command: serve --config=/etc/config/oathkeeper/config.yaml
volumes:
- ./tools/docker-compose/oathkeeper_config:/etc/config/oathkeeper
environment:
- LOG_LEAK_SENSITIVE_VALUES=true
# Use own build of ory kratos since latest ory kratos does not contain latest changes which we need
# for certain Kratos features
kratos-migrate:
image: ghcr.io/sensorbucket/oryd/kratos:latest
environment:
- DSN=postgres://sensorbucket:sensorbucket@db:5432/kratos?sslmode=disable
volumes:
- type: bind
source: ./tools/docker-compose/kratos_config
target: /etc/config/kratos
command: -c /etc/config/kratos/kratos.yml migrate sql -e --yes
kratos:
depends_on:
- kratos-migrate
image: ghcr.io/sensorbucket/oryd/kratos:latest
ports:
- '4433:4433' # public
- '4434:4434' # admin
environment:
- DSN=postgres://sensorbucket:sensorbucket@db:5432/kratos?sslmode=disable
- LOG_LEVEL=trace
command: serve -c /etc/config/kratos/kratos.yml --dev --watch-courier
volumes:
- type: bind
source: ./tools/docker-compose/kratos_config
target: /etc/config/kratos
db:
image: timescale/timescaledb-postgis:latest-pg12
volumes:
- ./tools/docker-compose/postgres.d:/docker-entrypoint-initdb.d
ports:
- 5432:5432
environment:
- POSTGRES_USER=sensorbucket
- POSTGRES_PASSWORD=sensorbucket
- POSTGRES_DB=sensorbucket
dbweb:
image: dockette/adminer:pgsql
mail-server:
image: mailhog/mailhog
ports:
- 1025:1025
mq:
image: rabbitmq:3.8-management
openapi:
image: swaggerapi/swagger-editor
environment:
- URL=/dev/api/ref/api.yaml
volumes:
- ./tools/openapi:/usr/share/nginx/html/ref
networks:
default:
name: sensorbucket_network