@@ -5,6 +5,13 @@ x-templates:
55 db-postgres :
66 condition : service_healthy
77 restart : unless-stopped
8+ postgres-env : &postgres-env
9+ DB_TYPE : postgres
10+ DB_HOST : db-postgres
11+ DB_PORT : 5432
12+ DB_NAME : ${POSTGRES_DB}
13+ DB_USER : ${POSTGRES_USER}
14+ DB_PASSWORD : ${POSTGRES_PASSWORD}
815
916services :
1017 core :
@@ -13,12 +20,7 @@ services:
1320 profiles : ["core"]
1421 command : ["node", "/app/packages/fasset-indexer-core/dist/src/run/run-indexer.js"]
1522 environment :
16- DB_TYPE : postgres
17- DB_HOST : db-postgres
18- DB_PORT : 5432
19- DB_NAME : ${POSTGRES_DB}
20- DB_USER : ${POSTGRES_USER}
21- DB_PASSWORD : ${POSTGRES_PASSWORD}
23+ << : *postgres-env
2224 CHAIN : ${CHAIN}
2325 RPC_URL : ${RPC_URL}
2426 RPC_API_KEY : ${RPC_API_KEY:-}
@@ -31,12 +33,7 @@ services:
3133 profiles : ["watchdog"]
3234 command : ["node", "/app/packages/fasset-indexer-core/dist/src/run/run-watchdog.js"]
3335 environment :
34- DB_TYPE : postgres
35- DB_HOST : db-postgres
36- DB_PORT : 5432
37- DB_NAME : ${POSTGRES_DB}
38- DB_USER : ${POSTGRES_USER}
39- DB_PASSWORD : ${POSTGRES_PASSWORD}
36+ << : *postgres-env
4037 CHAIN : ${CHAIN}
4138 RPC_URL : ${RPC_URL}
4239 RPC_API_KEY : ${RPC_API_KEY:-}
@@ -46,40 +43,38 @@ services:
4643 profiles : ["dogecoin"]
4744 command : ["node", "/app/packages/fasset-indexer-doge/dist/src/run/run-indexer.js"]
4845 environment :
49- DB_TYPE : postgres
50- DB_HOST : db-postgres
51- DB_PORT : 5432
52- DB_NAME : ${POSTGRES_DB}
53- DB_USER : ${POSTGRES_USER}
54- DB_PASSWORD : ${POSTGRES_PASSWORD}
46+ << : *postgres-env
5547 DOGE_RPC_URL : ${DOGE_RPC_URL}
5648 DOGE_RPC_API_KEY : ${DOGE_RPC_API_KEY:-}
5749 DOGE_RPC_USER : ${DOGE_RPC_USER:-}
5850 DOGE_RPC_PASSWORD : ${DOGE_RPC_PASSWORD:-}
5951 DOGE_MIN_BLOCK_NUMBER : ${DOGE_MIN_BLOCK_NUMBER}
52+ ripple :
53+ << : *base-svc
54+ container_name : ${COMPOSE_PROJECT_NAME}-ripple
55+ profiles : ["ripple"]
56+ command : ["node", "/app/packages/fasset-indexer-xrp/dist/src/run/run-indexer.js"]
57+ environment :
58+ << : *postgres-env
59+ XRP_RPC_URL : ${XRP_RPC_URL}
60+ XRP_RPC_API_KEY : ${XRP_RPC_API_KEY:-}
61+ XRP_MIN_BLOCK_NUMBER : ${XRP_MIN_BLOCK_NUMBER}
6062 api :
6163 << : *base-svc
6264 container_name : ${COMPOSE_PROJECT_NAME}-api
6365 profiles : ["api"]
6466 command : ["node", "/app/packages/fasset-indexer-api/dist/src/main"]
6567 environment :
66- DB_TYPE : postgres
67- DB_HOST : db-postgres
68- DB_PORT : 5432
69- DB_NAME : ${POSTGRES_DB}
70- DB_USER : ${POSTGRES_USER}
71- DB_PASSWORD : ${POSTGRES_PASSWORD}
68+ << : *postgres-env
7269 API_ROOT_PATH : ${API_ROOT_PATH:-}
7370 ports :
7471 - " ${API_PORT}:3000"
7572 db-postgres :
7673 image : postgres:16
7774 container_name : ${COMPOSE_PROJECT_NAME}-db
78- profiles : ["core", "watchdog", "dogecoin ", "api "]
75+ profiles : ["core", "watchdog", "api ", "ripple", "dogecoin "]
7976 environment :
80- POSTGRES_DB : ${POSTGRES_DB}
81- POSTGRES_USER : ${POSTGRES_USER}
82- POSTGRES_PASSWORD : ${POSTGRES_PASSWORD}
77+ << : *postgres-env
8378 volumes :
8479 - ' db_data:/var/lib/postgresql/data'
8580 healthcheck :
0 commit comments