-
Notifications
You must be signed in to change notification settings - Fork 17
/
docker-compose.yaml
64 lines (58 loc) · 1.66 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
services:
relations-api:
image: "quay.io/cloudservices/kessel-relations:latest"
environment:
- "SPICEDB_PRESHARED=${SPICEDB_GRPC_PRESHARED_KEY}"
- "SPICEDB_SCHEMA_FILE=/schema_file"
# - "SPICEDB_PRESHARED_FILE=/run/secrets/spicedb_pre_shared"
- "SPICEDB_ENDPOINT=spicedb:50051"
build:
dockerfile: Dockerfile
profiles: ["relations-api"]
secrets:
- spicedb_pre_shared
configs:
- schema_file
restart: "always"
ports:
- "8000:8000"
- "9000:9000"
spicedb:
image: "authzed/spicedb"
command: "serve"
restart: "always"
ports:
- "8080:8080"
- "9090:9090"
- "50051:50051"
environment:
- "SPICEDB_GRPC_PRESHARED_KEY=${SPICEDB_GRPC_PRESHARED_KEY}"
- "SPICEDB_DATASTORE_ENGINE=postgres"
- "SPICEDB_DATASTORE_CONN_URI=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@database:5432/spicedb?sslmode=disable"
depends_on:
- "migrate"
migrate:
image: "authzed/spicedb"
command: "migrate head"
restart: "on-failure"
environment:
- "SPICEDB_DATASTORE_ENGINE=postgres"
- "SPICEDB_DATASTORE_CONN_URI=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@database:5432/spicedb?sslmode=disable"
depends_on:
- "database"
database:
image: "postgres"
command: -c track_commit_timestamp=on
ports:
- "5432:5432"
environment:
- "POSTGRES_PASSWORD=${POSTGRES_PASSWORD}"
- "POSTGRES_DB=${POSTGRES_DBNAME}"
configs:
spicedb_pre_shared:
environment: "SPICEDB_GRPC_PRESHARED_KEY"
schema_file:
file: deploy/schema.zed
secrets:
spicedb_pre_shared:
file: ./.secrets/local-spicedb-secret