generated from ZEISS/template-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
64 lines (58 loc) · 1.36 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
services:
crdb:
image: cockroachdb/cockroach:latest-v24.1
ports:
- "26257:26257"
- "8082:8080"
networks:
- knox
command: start-single-node --insecure
volumes:
- crdb:/cockroach/cockroach-data
healthcheck:
test:
[
"CMD",
"curl",
"-f",
"http://localhost:8080/health?ready=1"
]
interval: 3s
timeout: 3s
retries: 5
migrate:
depends_on:
crdb:
condition: service_healthy
image: openfga/openfga:latest
container_name: migrate
command: migrate
environment:
- OPENFGA_DATASTORE_ENGINE=postgres
- OPENFGA_DATASTORE_URI=postgres://root@crdb:26257/defaultdb?sslmode=disable
networks:
- knox
openfga:
depends_on:
migrate:
condition: service_completed_successfully
image: openfga/openfga:latest
container_name: openfga
environment:
- OPENFGA_DATASTORE_ENGINE=postgres
- OPENFGA_DATASTORE_URI=postgres://root@crdb:26257/defaultdb?sslmode=disable
- OPENFGA_LOG_FORMAT=json
command: run
networks:
- knox
ports:
# Needed for the http server
- "8080:8080"
# Needed for the grpc server (if used)
- "8081:8081"
# Needed for the playground (Do not enable in prod!)
- "3001:3000"
volumes:
crdb:
networks:
knox: