-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-canton.yml
99 lines (94 loc) · 2.81 KB
/
docker-compose-canton.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
96
97
98
99
---
# Copyright 2022 Digital Asset (Switzerland) GmbH and/or its affiliates
#
# SPDX-License-Identifier: Apache-2.0
#
networks:
default:
name: daml_observability
volumes:
postgres:
name: daml_observability_postgres
services:
postgres:
# Latest PostgreSQL version supported by Canton
# https://www.postgresql.org/support/versioning/
image: postgres:14.9-bullseye
container_name: daml_observability_postgres
environment:
# For default admin user 'postgres'
POSTGRES_PASSWORD: postgres
volumes:
# PostgreSQL persistent data
- postgres:/var/lib/postgresql/data
# PostgreSQL bootstrap queries
- ./postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
# Wait for PostgreSQL to be up and ready after bootstrap
healthcheck:
test: "pg_isready -U postgres"
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
canton:
image: digitalasset/canton:${CANTON_VERSION}
container_name: daml_observability_canton
build:
context: canton
dockerfile: Dockerfile
args:
CANTON_IMAGE: ${CANTON_IMAGE}
CANTON_VERSION: ${CANTON_VERSION}
ports:
# Participant ledger API
- 10011:10011
# Participant admin API
- 10012:10012
# Domain public API
- 10018:10018
# Domain admin API
- 10019:10019
# Prometheus exporter
- 19090:19090
environment:
JDK_JAVA_OPTIONS: "-XX:+ExitOnOutOfMemoryError -Xmx3G"
command:
- "daemon"
- "--log-level-root=${LOG_LEVEL:-INFO}"
- "--log-level-canton=${LOG_LEVEL:-INFO}"
- "--log-level-stdout=${LOG_LEVEL:-INFO}"
- "--log-encoder=json"
- "--log-file-name=/var/log/promtail/canton.log"
- "--config=/canton/config/monitoring.conf"
- "--config=/canton/config/postgres.conf"
- "--config=/canton/config/domain.conf,/canton/config/participant.conf"
- "--bootstrap=/canton/config/bootstrap.canton"
volumes:
# Canton configuration
- ./canton:/canton/config
# Logs
- logs:/var/log/promtail
healthcheck:
# Requires grpcurl and jq in image
test: "grpcurl --plaintext localhost:10012 com.digitalasset.canton.health.admin.v0.StatusService.Status | jq -e '.success | select(.active)'"
interval: 10s
timeout: 1s
retries: 3
start_period: 30s
depends_on:
postgres:
condition: service_healthy
console:
image: ${CANTON_IMAGE}:${CANTON_VERSION}
container_name: daml_observability_canton_console
environment:
JDK_JAVA_OPTIONS: "-XX:+ExitOnOutOfMemoryError -Xmx1G"
entrypoint: ["tail", "-f", "/dev/null"]
stop_grace_period: "0s"
volumes:
# Canton configuration
- ./canton:/canton/config
# Logs
- logs:/var/log/promtail
depends_on:
- canton