Skip to content

Commit

Permalink
feat:add rest java container
Browse files Browse the repository at this point in the history
Signed-off-by: georgi-l95 <[email protected]>
  • Loading branch information
georgi-l95 committed Oct 8, 2024
1 parent 5682eca commit b51b4ba
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
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

0 comments on commit b51b4ba

Please sign in to comment.