Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
haf_api_node
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
haf_api_node
Commits
4cdb0c84
Commit
4cdb0c84
authored
4 months ago
by
Dan Notestein
Browse files
Options
Downloads
Patches
Plain Diff
Fix balance tracker so that it can be run standalone in addition to just
as part of hafbe
parent
dcaf29a3
No related branches found
No related tags found
2 merge requests
!66
Merge develop to master for release
,
!47
Fix balance tracker so that it can be run standalone
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.env.example
+13
-2
13 additions, 2 deletions
.env.example
balance_tracker.yaml
+16
-7
16 additions, 7 deletions
balance_tracker.yaml
haf_base.yaml
+1
-0
1 addition, 0 deletions
haf_base.yaml
haf_block_explorer.yaml
+21
-2
21 additions, 2 deletions
haf_block_explorer.yaml
with
51 additions
and
11 deletions
.env.example
+
13
−
2
View file @
4cdb0c84
...
@@ -114,8 +114,19 @@ NETWORK_NAME=haf
...
@@ -114,8 +114,19 @@ NETWORK_NAME=haf
# REPUTATION_TRACKER_VERSION=${HIVE_API_NODE_VERSION}
# REPUTATION_TRACKER_VERSION=${HIVE_API_NODE_VERSION}
# REPTRACKER_SCHEMA="hafbe-rt"
# There are two ways of running Balance Tracker: as a standalone app, or
# BTRACKER_SCHEMA="hafbe-bt"
# integrated with HAF Block Explorer. While you can technically run both,
# there's no good reason to do so--you'll just waste disk space and processing
# power maintaining two copies of the data.
# Regardless of which way you decide to run Balance Tracker, you will need
# to run a single API server, and it needs to know which schema the data is
# stored in. It will be in "hafbe_bal" if you're running HAF Block Explorer,
# and "btracker_app" if you're running Balance Tracker standalone.
# The default behavior is to serve data from the HAF Block Explorer, but
# if you're only running the standalone Balance Tracker, uncomment the next
# line:
# BTRACKER_SCHEMA="btracker_app"
# The default setup will run the recommended version of HAF block explorer,
# The default setup will run the recommended version of HAF block explorer,
# you can run a custom version by un-commenting and modifying the
# you can run a custom version by un-commenting and modifying the
# values below
# values below
...
...
This diff is collapsed.
Click to expand it.
balance_tracker.yaml
+
16
−
7
View file @
4cdb0c84
# Note, most of the services in this file are only used in the uncommon case where
# the node is running Balance Tracker standalone. Balance Tracker is typically
# run as part of HAF Block Explorer, and the services related to that usage are
# in haf_block_explorer.yaml.
# The exception is the postgrest server & rewriter. Those are shared between the two
services
:
services
:
balance-tracker-install
:
balance-tracker-install
:
image
:
${BALANCE_TRACKER_IMAGE:-${HIVE_API_NODE_REGISTRY:-registry.hive.blog}/balance_tracker}:${BALANCE_TRACKER_VERSION:-${HIVE_API_NODE_VERSION}}
image
:
${BALANCE_TRACKER_IMAGE:-${HIVE_API_NODE_REGISTRY:-registry.hive.blog}/balance_tracker}:${BALANCE_TRACKER_VERSION:-${HIVE_API_NODE_VERSION}}
profiles
:
profiles
:
-
apps
-
balance-tracker-standalone
-
hafbe
-
balance-tracker-setup
environment
:
environment
:
POSTGRES_HOST
:
haf
POSTGRES_HOST
:
haf
networks
:
networks
:
haf-network
:
haf-network
:
command
:
command
:
-
install_app
-
install_app
-
--schema=
${BTRACKER_SCHEMA:-hafbe_bal}
-
--schema=
btracker_app
-
--swagger-url=${PUBLIC_HOSTNAME}
-
--swagger-url=${PUBLIC_HOSTNAME}
depends_on
:
depends_on
:
haf
:
haf
:
condition
:
service_healthy
condition
:
service_healthy
# to uninstall Balance Tracker (standalone), shut down the stack and run a command like:
# docker compose --profile core --profile balance-tracker-standalone-uninstall up -d
balance-tracker-uninstall
:
balance-tracker-uninstall
:
image
:
${BALANCE_TRACKER_IMAGE:-${HIVE_API_NODE_REGISTRY:-registry.hive.blog}/balance_tracker}:${BALANCE_TRACKER_VERSION:-${HIVE_API_NODE_VERSION}}
image
:
${BALANCE_TRACKER_IMAGE:-${HIVE_API_NODE_REGISTRY:-registry.hive.blog}/balance_tracker}:${BALANCE_TRACKER_VERSION:-${HIVE_API_NODE_VERSION}}
profiles
:
profiles
:
-
balance-tracker-uninstall
-
balance-tracker-
standalone-
uninstall
environment
:
environment
:
POSTGRES_HOST
:
haf
POSTGRES_HOST
:
haf
networks
:
networks
:
haf-network
:
haf-network
:
command
:
command
:
-
uninstall_app
-
uninstall_app
-
--schema=
${BTRACKER_SCHEMA:-hafbe_bal}
-
--schema=
btracker_app
depends_on
:
depends_on
:
haf
:
haf
:
condition
:
service_healthy
condition
:
service_healthy
...
@@ -41,7 +46,7 @@ services:
...
@@ -41,7 +46,7 @@ services:
haf-network
:
haf-network
:
command
:
command
:
-
process_blocks
-
process_blocks
-
--schema=
${BTRACKER_SCHEMA:-hafbe_bal}
-
--schema=
btracker_app
healthcheck
:
healthcheck
:
test
:
[
"
CMD-SHELL"
,
"
/app/block-processing-healthcheck.sh"
]
test
:
[
"
CMD-SHELL"
,
"
/app/block-processing-healthcheck.sh"
]
interval
:
60s
interval
:
60s
...
@@ -80,6 +85,10 @@ services:
...
@@ -80,6 +85,10 @@ services:
depends_on
:
depends_on
:
balance-tracker-install
:
balance-tracker-install
:
condition
:
service_completed_successfully
condition
:
service_completed_successfully
required
:
false
# allow this service to be missing (when only running hafbe)
block-explorer-install-balance-tracker
:
condition
:
service_completed_successfully
required
:
false
# allow this service to be missing (when only running standalone)
haf
:
haf
:
condition
:
service_healthy
condition
:
service_healthy
balance-tracker-postgrest-rewriter
:
balance-tracker-postgrest-rewriter
:
...
...
This diff is collapsed.
Click to expand it.
haf_base.yaml
+
1
−
0
View file @
4cdb0c84
...
@@ -43,6 +43,7 @@ services:
...
@@ -43,6 +43,7 @@ services:
host
haf_block_log
haf_admin
${COMPOSE_PROJECT_NAME}-block-explorer-uninstall-1.${NETWORK_NAME}
trust
\n
host
haf_block_log
haf_admin
${COMPOSE_PROJECT_NAME}-block-explorer-uninstall-1.${NETWORK_NAME}
trust
\n
host
haf_block_log
hafbe_owner
${COMPOSE_PROJECT_NAME}-block-explorer-uninstall-1.${NETWORK_NAME}
trust
\n
host
haf_block_log
hafbe_owner
${COMPOSE_PROJECT_NAME}-block-explorer-uninstall-1.${NETWORK_NAME}
trust
\n
host
haf_block_log
haf_admin
${COMPOSE_PROJECT_NAME}-block-explorer-uninstall-balance-tracker-1.${NETWORK_NAME}
trust
\n
host
haf_block_log
haf_admin
${COMPOSE_PROJECT_NAME}-block-explorer-uninstall-balance-tracker-1.${NETWORK_NAME}
trust
\n
host
haf_block_log
haf_admin
${COMPOSE_PROJECT_NAME}-block-explorer-install-balance-tracker-1.${NETWORK_NAME}
trust
\n
host
haf_block_log
haf_admin
${COMPOSE_PROJECT_NAME}-block-explorer-uninstall-reputation-tracker-1.${NETWORK_NAME}
trust
\n
host
haf_block_log
haf_admin
${COMPOSE_PROJECT_NAME}-block-explorer-uninstall-reputation-tracker-1.${NETWORK_NAME}
trust
\n
...
...
This diff is collapsed.
Click to expand it.
haf_block_explorer.yaml
+
21
−
2
View file @
4cdb0c84
...
@@ -14,12 +14,14 @@ services:
...
@@ -14,12 +14,14 @@ services:
depends_on
:
depends_on
:
haf
:
haf
:
condition
:
service_healthy
condition
:
service_healthy
balance-tracker
-install
:
block-explorer-install-
balance-tracker
:
condition
:
service_completed_successfully
condition
:
service_completed_successfully
hafah-install
:
hafah-install
:
condition
:
service_completed_successfully
condition
:
service_completed_successfully
reputation-tracker-install
:
reputation-tracker-install
:
condition
:
service_completed_successfully
condition
:
service_completed_successfully
# to uninstall HAF Block Explorer, shut down the stack and run a command like:
# docker compose --profile core --profile block-explorer-uninstall up -d
block-explorer-uninstall
:
block-explorer-uninstall
:
image
:
${HAF_BLOCK_EXPLORER_IMAGE:-${HIVE_API_NODE_REGISTRY:-registry.hive.blog}/haf_block_explorer}:${HAF_BLOCK_EXPLORER_VERSION:-${HIVE_API_NODE_VERSION}}
image
:
${HAF_BLOCK_EXPLORER_IMAGE:-${HIVE_API_NODE_REGISTRY:-registry.hive.blog}/haf_block_explorer}:${HAF_BLOCK_EXPLORER_VERSION:-${HIVE_API_NODE_VERSION}}
profiles
:
profiles
:
...
@@ -33,6 +35,22 @@ services:
...
@@ -33,6 +35,22 @@ services:
depends_on
:
depends_on
:
haf
:
haf
:
condition
:
service_healthy
condition
:
service_healthy
block-explorer-install-balance-tracker
:
image
:
${BALANCE_TRACKER_IMAGE:-${HIVE_API_NODE_REGISTRY:-registry.hive.blog}/balance_tracker}:${BALANCE_TRACKER_VERSION:-${HIVE_API_NODE_VERSION}}
profiles
:
-
apps
-
hafbe
environment
:
POSTGRES_HOST
:
haf
networks
:
haf-network
:
command
:
-
install_app
-
--schema=hafbe_bal
-
--swagger-url=${PUBLIC_HOSTNAME}
depends_on
:
haf
:
condition
:
service_healthy
block-explorer-uninstall-balance-tracker
:
block-explorer-uninstall-balance-tracker
:
image
:
${BALANCE_TRACKER_IMAGE:-${HIVE_API_NODE_REGISTRY:-registry.hive.blog}/balance_tracker}:${BALANCE_TRACKER_VERSION:-${HIVE_API_NODE_VERSION}}
image
:
${BALANCE_TRACKER_IMAGE:-${HIVE_API_NODE_REGISTRY:-registry.hive.blog}/balance_tracker}:${BALANCE_TRACKER_VERSION:-${HIVE_API_NODE_VERSION}}
profiles
:
profiles
:
...
@@ -43,6 +61,7 @@ services:
...
@@ -43,6 +61,7 @@ services:
haf-network
:
haf-network
:
command
:
command
:
-
uninstall_app
-
uninstall_app
-
--schema=hafbe_bal
depends_on
:
depends_on
:
block-explorer-uninstall
:
block-explorer-uninstall
:
condition
:
service_completed_successfully
condition
:
service_completed_successfully
...
@@ -100,7 +119,7 @@ services:
...
@@ -100,7 +119,7 @@ services:
PGRST_DB_POOL
:
20
PGRST_DB_POOL
:
20
PGRST_DB_POOL_ACQUISITION_TIMEOUT
:
10
PGRST_DB_POOL_ACQUISITION_TIMEOUT
:
10
PGRST_DB_ROOT_SPEC
:
root
PGRST_DB_ROOT_SPEC
:
root
PGRST_DB_EXTRA_SEARCH_PATH
:
${BTRACKER_SCHEMA:-
hafbe_bal
}
,
${REPTRACKER_SCHEMA:-
reptracker_app
}
PGRST_DB_EXTRA_SEARCH_PATH
:
hafbe_bal, reptracker_app
# PGRST_OPENAPI_SERVER_PROXY_URI: http://${PUBLIC_HOSTNAME}/hafbe_api/
# PGRST_OPENAPI_SERVER_PROXY_URI: http://${PUBLIC_HOSTNAME}/hafbe_api/
networks
:
networks
:
haf-network
:
haf-network
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment