@@ -109,7 +109,7 @@ services:
109109 POSTGRES_USER : postgres
110110 POSTGRES_PASSWORD : p@ssw0rd
111111 POSTGRES_DB : postgres
112- POSTGRES_MULTIPLE_DATABASES : relayer,erc20_api
112+ POSTGRES_MULTIPLE_DATABASES : relayer,erc20_api,canton_indexer
113113 ports :
114114 - " 5432:5432"
115115 volumes :
@@ -154,6 +154,7 @@ services:
154154 ENV : docker
155155 CONFIG_FILE : /app/state/config.yaml
156156 API_SERVER_CONFIG_FILE : /app/state/api-server-config.yaml
157+ INDEXER_CONFIG_FILE : /app/state/indexer-config.yaml
157158 CANTON_HTTP : http://canton:5013
158159 BROADCAST_DIR : /app/broadcast
159160 RELAYER_DATABASE_URL : " ${RELAYER_DATABASE_URL:-postgres://postgres:p%40ssw0rd@postgres:5432/relayer}"
@@ -258,6 +259,45 @@ services:
258259 networks :
259260 - bridge-network
260261
262+ # ===========================================================================
263+ # Canton Indexer
264+ # ===========================================================================
265+ indexer :
266+ build :
267+ context : .
268+ dockerfile : Dockerfile.local
269+ target : indexer
270+ container_name : canton-indexer
271+ ports :
272+ - " 8082:8082"
273+ volumes :
274+ - config_state:/app/state:ro
275+ command : ["-config", "/app/state/indexer-config.yaml"]
276+ environment :
277+ LOG_LEVEL : debug
278+ ENV : docker
279+ INDEXER_DATABASE_URL : " ${INDEXER_DATABASE_URL:-postgres://postgres:p%40ssw0rd@postgres:5432/canton_indexer}"
280+ CANTON_AUTH_CLIENT_ID : " ${CANTON_AUTH_CLIENT_ID:-local-test-client}"
281+ CANTON_AUTH_CLIENT_SECRET : " ${CANTON_AUTH_CLIENT_SECRET:-local-test-secret}"
282+ depends_on :
283+ bootstrap :
284+ condition : service_completed_successfully
285+ postgres :
286+ condition : service_healthy
287+ canton :
288+ condition : service_healthy
289+ mock-oauth2 :
290+ condition : service_healthy
291+ restart : unless-stopped
292+ healthcheck :
293+ test : ["CMD", "wget", "-qO-", "http://localhost:8082/health"]
294+ interval : 10s
295+ timeout : 5s
296+ retries : 5
297+ start_period : 30s
298+ networks :
299+ - bridge-network
300+
261301networks :
262302 bridge-network :
263303 driver : bridge
0 commit comments