Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Hedera Mirror Node Rest Java container #791

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions compose-network/mirror-node/application.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
hedera:
mirror:
restJava:
db:
host: 127.0.0.1
name: mirror_node
password: mirror_rest_java_pass
port: 5432
sslMode: DISABLE
statementTimeout: 10000
username: mirror_rest_java
response:
headers:
defaults:
# Headers set by default unless overridden in specific request mapping paths defined below.
"Access-Control-Allow-Origin": "*"
"Cache-Control": "public, max-age=1"
path:
# Override inherited defaults and define additional headers for individual controller request mappings.
# "[]" around the path preserves special characters. Multiple header name/value pairs may be defined per path.
"[/api/v1/topics/{id}]":
"Cache-Control": "public, max-age=5"

grpc:
listener:
type: SHARED_POLL
Expand Down
23 changes: 23 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,29 @@ services:
restart: unless-stopped
tty: false

rest-java:
image: "${MIRROR_IMAGE_PREFIX}hedera-mirror-rest-java:${MIRROR_REST_IMAGE_TAG:-${MIRROR_IMAGE_TAG}}"
container_name: mirror-node-rest-java
mem_swappiness: 0
mem_limit: "${MIRROR_REST_MEM_LIMIT}"
memswap_limit: "${MIRROR_REST_MEM_LIMIT}"
depends_on:
importer:
condition: service_started
db:
condition: service_started
environment:
HEDERA_MIRROR_RESTJAVA_DB_HOST: db
SPRING_CONFIG_ADDITIONAL_LOCATION: file:/usr/etc/hedera-mirror-rest-java/
networks:
- mirror-node
ports:
- 8084:8084
restart: unless-stopped
tty: true
volumes:
- ./application.yml:/usr/etc/hedera-mirror-rest-java/application.yml

explorer:
container_name: hedera-explorer
image: "${MIRROR_NODE_EXPLORER_IMAGE_PREFIX}hedera-mirror-node-explorer:${MIRROR_NODE_EXPLORER_IMAGE_TAG}"
Expand Down
Loading