-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
95 lines (87 loc) · 2.09 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
services:
postgres:
image: postgres:14
container_name: postgres
command: postgres -c 'max_connections=100'
networks:
- default
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
migrate:
depends_on:
postgres:
condition: service_healthy
image: openfga/openfga:latest
container_name: migrate
environment:
- OPENFGA_DATASTORE_ENGINE=postgres
- OPENFGA_DATASTORE_URI=postgres://postgres:password@postgres:5432/postgres?sslmode=disable
command: migrate
networks:
- default
openfga:
depends_on:
migrate:
condition: service_completed_successfully
image: openfga/openfga:latest
container_name: openfga
command: run
environment:
- OPENFGA_DATASTORE_ENGINE=postgres
- OPENFGA_DATASTORE_URI=postgres://postgres:password@postgres:5432/postgres?sslmode=disable
- OPENFGA_DATASTORE_MAX_OPEN_CONNS=100 #see postgres container
- OPENFGA_PLAYGROUND_ENABLED=true
networks:
- default
ports:
- "8080:8080" #http
- "8081:8081" #grpc
- "3000:3000" #playground
- "2112:2112" #prometheus metrics
healthcheck:
test:
[
"CMD",
"/usr/local/bin/grpc_health_probe",
"-addr=openfga:8081"
]
interval: 5s
timeout: 30s
retries: 3
east1:
image: docker.io/nats:2.10.9
ports:
- "4222:4222"
- "8222:8222"
volumes:
- east1:/data
configs:
- source: east.conf
target: /example/east.conf
- source: sys.conf
target: /example/sys.conf
# - source: west.conf
# target: /config/west.conf
# - source: central.conf
# target: /config/central.conf
command:
- '-c'
- '/example/east.conf'
configs:
sys.conf:
file: './example/sys.conf'
east.conf:
file: './example/east.conf'
volumes:
crdb:
east1:
networks:
typhoon: