-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
84 lines (79 loc) · 1.91 KB
/
docker-compose.yml
File metadata and controls
84 lines (79 loc) · 1.91 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
services:
authz:
platform: linux/amd64
image: pingpong-authz:latest
build:
context: ./openfga
dockerfile: Dockerfile
container_name: pingpong-authz
command: [run]
expose: [8080, 8081, 3003]
ports: ["8080:8080", "8081:8081", "3003:3000"]
environment:
OPENFGA_DATASTORE_MAX_OPEN_CONNS: 40
OPENFGA_DATASTORE_MAX_IDLE_CONNS: 25
OPENFGA_MAX_CONCURRENT_READS_FOR_CHECK: 100
OPENFGA_LIST_OBJECTS_MAX_RESULTS: 0
OPENFGA_LIST_OBJECTS_DEADLINE: 30s
OPENFGA_REQUEST_TIMEOUT: 35s
OPENFGA_EXPERIMENTALS: enable-list-users
secrets:
- source: openfgacfg
mode: 0400
target: /etc/openfga/config.yaml
healthcheck:
test: ["CMD", "/usr/local/bin/grpc_health_probe", "-addr=authz:8081"]
interval: 5s
timeout: 30s
retries: 3
web:
platform: linux/amd64
image: pingpong-web:latest
build:
context: ./web
dockerfile: Dockerfile
args:
host: 0.0.0.0
port: 3000
restart: always
expose: [80]
ports: ["80:3000"]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 5s
timeout: 5s
retries: 3
start_period: 15s
srv:
platform: linux/amd64
image: pingpong-srv:latest
build:
context: ./
dockerfile: Dockerfile.srv
restart: always
expose: [8000]
ports: ["8000:8000"]
secrets:
- source: app_config
target: /code/config.toml
mode: 0400
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 5s
timeout: 5s
retries: 3
start_period: 15s
# Use ephemeral volume in dev
volumes:
dbdata:
driver_opts: {}
logs:
driver_opts: {}
# Use local config in dev
secrets:
app_config:
file: ./config.dev.toml
traefikcrtcfg:
file: ./traefik-crt.yml
openfgacfg:
file: ./openfga-config.dev.yml