-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-ledger-postgres.yml
68 lines (63 loc) · 2.18 KB
/
docker-compose-ledger-postgres.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
include:
- ./docker-compose-ledger-common.yml
services:
postgres:
image: postgres:15
container_name: "postgres-1"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
networks:
- scalar-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 1s
timeout: 10s
retries: 60
start_period: 30s
scalardl-ledger-schema-loader:
image: ghcr.io/scalar-labs/scalardl-schema-loader:${SCALARDL_VERSION}
volumes:
- ./scalardb.postgres.properties:/scalardb.properties
depends_on:
postgres:
condition: service_healthy
command:
- "-c"
- "/scalardb.properties"
- "--coordinator"
networks:
- scalar-network
restart: on-failure
scalar-ledger:
image: ghcr.io/scalar-labs/scalardl-ledger-byol:${SCALARDL_VERSION}
container_name: "scalardl-samples-scalar-ledger-1"
volumes:
- ./fixture/ledger-key.pem:/scalar/ledger-key.pem
- ./fixture/ledger.properties.tmpl:/scalar/ledger/ledger.properties.tmpl
- ./fixture/trial-license-cert.pem:/scalar/license-cert.pem
# If you have a commercial license key, you must use `commercial-license-cert.pem` instead of `trial-license-cert.pem`.
# - ./fixture/commercial-license-cert.pem:/scalar/license-cert.pem
depends_on:
scalardl-ledger-schema-loader:
condition: service_completed_successfully
environment:
- SCALAR_DB_CONTACT_POINTS=jdbc:postgresql://postgres/
- SCALAR_DB_STORAGE=jdbc
- SCALAR_DB_USERNAME=postgres
- SCALAR_DB_PASSWORD=postgres
- SCALAR_DL_LEDGER_PROOF_ENABLED=true
- SCALAR_DL_LEDGER_PROOF_PRIVATE_KEY_PATH=/scalar/ledger-key.pem
##### PLEASE REPLACE THIS VALUE WITH YOUR LICENSE KEY #####
- SCALAR_DL_LICENSING_LICENSE_KEY=<SET_YOUR_LICENSE_KEY>
##### PLEASE REPLACE THIS VALUE WITH YOUR LICENSE KEY #####
networks:
- scalar-network
healthcheck:
test: ["CMD-SHELL", "grpc_health_probe -addr=localhost:50051 && grpc_health_probe -addr=ledger-envoy:50051 || exit 1"]
interval: 1s
timeout: 10s
retries: 60
start_period: 10s