Skip to content

Commit 98a727c

Browse files
author
Mateusz Czeladka
committed
Merge remote-tracking branch 'origin/main' into develop
2 parents f973b96 + be7989f commit 98a727c

File tree

7 files changed

+20
-18
lines changed

7 files changed

+20
-18
lines changed

.env.docker-compose-profile-mid-level

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ API_DB_POOL_MAX_COUNT=150
33

44
DB_POSTGRES_MAX_CONNECTIONS=300
55
DB_POSTGRES_SHARED_BUFFERS=4GB
6-
DB_POSTGRES_EFFECTIVE_CACHE_SIZE=16GB
6+
DB_POSTGRES_EFFECTIVE_CACHE_SIZE=8GB
77
DB_POSTGRES_WORK_MEM=64MB
88
DB_POSTGRES_MAINTENANCE_WORK_MEM=512MB
99
DB_POSTGRES_WAL_BUFFERS=512MB

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=cardano-foundation_cardano-rosetta-java&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=cardano-foundation_cardano-rosetta-java)
2-
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=cardano-foundation_cardano-rosetta-java&metric=coverage)](https://sonarcloud.io/summary/new_code?id=cardano-foundation_cardano-rosetta-java)
1+
[![Build](https://github.com/cardano-foundation/cardano-rosetta-java/actions/workflows/feature-mvn-build.yaml/badge.svg)](https://github.com/cardano-foundation/cardano-rosetta-java/actions/workflows/feature-mvn-build.yaml)
2+
[![License](https://img.shields.io:/github/license/cardano-foundation/cardano-rosetta-java?label=license)](https://github.com/cardano-foundation/cardano-rosetta-java/blob/master/LICENSE)
3+
![Discord](https://img.shields.io/discord/1022471509173882950)
4+
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=cardano-foundation_cardano-rosetta-java&metric=coverage)](https://sonarcloud.io/summary/overall?id=cardano-foundation_cardano-rosetta-java)
35
[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B45571%2Fgithub.com%2Fcardano-foundation%2Fcardano-rosetta-java.svg?type=shield&issueType=license)](https://app.fossa.com/projects/custom%2B45571%2Fgithub.com%2Fcardano-foundation%2Fcardano-rosetta-java?ref=badge_shield&issueType=license)
46

57
## What the project is about?
@@ -42,7 +44,7 @@ The default config is focused on mainnet. If you want to test this on other Card
4244
git clone https://github.com/cardano-foundation/cardano-rosetta-java
4345
cd cardano-rosetta-java
4446
docker build -t rosetta-java -f ./docker/Dockerfile .
45-
docker run --name rosetta -v {CUSTOM_MOUNT_PATH}:/node --env-file ./docker/.env.dockerfile --env-file ./docker/.env.docker-profile-entry-level -p 8082:8082 -d rosetta-java
47+
docker run --name rosetta -v {CUSTOM_MOUNT_PATH}:/node --env-file ./docker/.env.dockerfile --env-file ./docker/.env.docker-profile-mid-level -p 8082:8082 --shm-size=4g -d rosetta-java
4648
```
4749
Detailed explanation can be found in the [Wiki](https://github.com/cardano-foundation/cardano-rosetta-java/wiki/3.-Getting-Started-with-Docker).
4850

@@ -81,13 +83,13 @@ Default is `online`.
8183
For every Release we provide pre-built docker images stored in the DockerHub Repositories of the Cardano Foundation ([DockerHub](https://hub.docker.com/orgs/cardanofoundation/repositories))
8284
To start it use the following command:
8385
```bash
84-
docker run --name rosetta -v {CUSTOM_MOUNT_PATH}:/node --env-file ./docker/.env.dockerfile --env-file ./docker/.env.docker-profile-entry-level -p 8082:8082 -d cardanofoundation/cardano-rosetta-java:1.2.5
86+
docker run --name rosetta -v {CUSTOM_MOUNT_PATH}:/node --env-file ./docker/.env.dockerfile --env-file ./docker/.env.docker-profile-mid-level -p 8082:8082 --shm-size=4g -d cardanofoundation/cardano-rosetta-java:1.2.6
8587
```
8688
Changes to the configuration can be made by adjusting the `docker/.env.dockerfile` file. For more information on the environment variables, please refer to the [Wiki](https://github.com/cardano-foundation/cardano-rosetta-java/wiki/5.-Environment-Variables).
8789

8890
If you want to use the `cardano-submit-api` you can additionally expose port `8090`. It can then be used to submit raw cbor transaction (API documentation here: [Link](https://input-output-hk.github.io/cardano-rest/submit-api/))
8991
```bash
90-
docker run --name rosetta -v {CUSTOM_MOUNT_PATH}:/node --env-file ./docker/.env.dockerfile --env-file ./docker/.env.docker-profile-entry-level -p 8090:8090 -p 8082:8082 -d cardanofoundation/cardano-rosetta-java:1.2.6
92+
docker run --name rosetta -v {CUSTOM_MOUNT_PATH}:/node --env-file ./docker/.env.dockerfile --env-file ./docker/.env.docker-profile-mid-level -p 8090:8090 -p 8082:8082 --shm-size=4g -d cardanofoundation/cardano-rosetta-java:1.2.6
9193
```
9294
### Docker compose
9395
If needed we also provide all components needed to run Rosetta in a docker-compose file.
@@ -100,7 +102,7 @@ This will start:
100102

101103
### Entry level hardware profile
102104
```bash
103-
docker-compose --env-file .env.docker-compose --env-file .env.docker-compose-profile-entry-level -f docker-compose.yaml up -d
105+
docker-compose --env-file .env.docker-compose --env-file .env.docker-compose-profile-mid-level -f docker-compose.yaml up -d
104106
```
105107

106108
### A complete list of hardware profiles:

docker-compose-indexer.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ services:
4343

4444
db:
4545
image: ${DB_IMAGE_NAME}:${DB_IMAGE_TAG}
46-
shm_size: 30g
46+
shm_size: 4g
4747
ports:
4848
- ${DB_PORT}:${DB_PORT}
4949
command: [

docker/.env.docker-profile-mid-level

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ API_DB_POOL_MAX_COUNT=150
33

44
DB_POSTGRES_MAX_CONNECTIONS=300
55
DB_POSTGRES_SHARED_BUFFERS=4GB
6-
DB_POSTGRES_EFFECTIVE_CACHE_SIZE=16GB
6+
DB_POSTGRES_EFFECTIVE_CACHE_SIZE=8GB
77
DB_POSTGRES_WORK_MEM=64MB
88
DB_POSTGRES_MAINTENANCE_WORK_MEM=512MB
99
DB_POSTGRES_WAL_BUFFERS=512MB

docker/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ configure_postgres() {
119119
echo "Make sure to pass an additional --env-file parameter when running the container."
120120
echo ""
121121
echo "Example Docker run command for an 'entry_level' hardware profile:"
122-
echo "docker run --env-file ./docker/.env.dockerfile --env-file ./docker/.env.docker-profile-entry-level -p 8082:8082 -d cardanofoundation/cardano-rosetta-java:latest"
122+
echo "docker run --env-file ./docker/.env.dockerfile --env-file ./docker/.env.docker-profile-mid-level -p 8082:8082 --shm-size=4g -d cardanofoundation/cardano-rosetta-java:latest"
123123
echo ""
124124
exit 1
125125
fi

docker/readme.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The build can take up to 1.5 hours.
1616

1717
### 2. Run
1818
````
19-
docker run --env-file ./docker/.env.dockerfile --env-file ./docker/.env.docker-profile-entry-level -p 8082:8082 -d {image_name}:latest
19+
docker run --env-file ./docker/.env.dockerfile --env-file ./docker/.env.docker-profile-mid-level -p 8082:8082 --shm-size=4g -d {image_name}:latest
2020
````
2121
You need to specify the path to the environment variables file and open the port.
2222

@@ -56,28 +56,28 @@ PG_VERSION=14
5656

5757
### 5. Volume with Cardano node data
5858
````
59-
docker run --env-file .\docker\.env.dockerfile --env-file ./docker/.env.docker-profile-entry-level -p 8082:8082 -v {custom_folder}:/node/db -d {image_name}:latest
59+
docker run --env-file .\docker\.env.dockerfile --env-file ./docker/.env.docker-profile-mid-level -p 8082:8082 -v {custom_folder}:/node/db --shm-size=4g -d {image_name}:latest
6060
````
6161
If you want to use already existing cardano data, you can mount the data volume to the ``/node/db`` folder inside the container to prevent loading during initialization.
6262

6363
### 6. Volume with Postgres data
6464
````
65-
docker run --env-file .\docker\.env.dockerfile --env-file ./docker/.env.docker-profile-entry-level -p 8082:8082 -v {custom_folder}:/node/postgres -d {image_name}:latest
65+
docker run --env-file .\docker\.env.dockerfile --env-file ./docker/.env.docker-profile-mid-level -p 8082:8082 -v {custom_folder}:/node/postgres --shm-size=4g -d {image_name}:latest
6666
````
6767

6868
You can mount a volume with Postgres node data to ``/node/postgres`` point to use already existed data.
6969
If the mounted volume does not contain the database or empty, new database will be created there.
7070

7171
### 7. Volume with custom network configurations
7272
````
73-
docker run --env-file .\docker\.env.dockerfile --env-file ./docker/.env.docker-profile-entry-level -p 8082:8082 -v {custom_folder}:/networks -d {image_name}:latest
73+
docker run --env-file .\docker\.env.dockerfile --env-file ./docker/.env.docker-profile-mid-level -p 8082:8082 -v {custom_folder}:/networks --shm-size=4g -d {image_name}:latest
7474
````
7575
The cardano node configuration jsons are stored in the ``config`` folder and copied into the image on build.
7676
If you want to use a custom configuration without rebuilding the image, we can mount a volume with configs to ``/networks`` folder inside the container.
7777

7878
### 8. Synchronization mode
7979
````
80-
docker run -e SYNC=true --env-file .\docker\.env.dockerfile -p 8082:8082 -d {image_name}:latest
80+
docker run -e SYNC=true --env-file .\docker\.env.dockerfile --env-file ./docker/.env.docker-profile-mid-level -p 8082:8082 --shm-size=4g -d {image_name}:latest
8181
````
8282
The container can be started in synchronization mode. In this case, the container will verify chunks and synchronize all nodes when it is started and run ``Rosseta Api`` after that
8383
To start it you need to change the ``SYNC`` variable in ``.env.dockerfile`` or by adding the ``-e SYNC=true`` key when starting the container.

docs/docs/getting-started/docker.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ The default values:
8989
### 2. How to run the container
9090

9191
```
92-
docker run --env-file ./docker/.env.dockerfile --env-file .env.docker-profile-entry-level -p 8082:8082 -it {image_name}:latest
92+
docker run --env-file ./docker/.env.dockerfile --env-file .env.docker-profile-mid-level -p 8082:8082 -it {image_name}:latest
9393
```
9494

9595
You need to specify the path to the environment variables file and open the port. The standard Port for the API is `8082`.
@@ -99,7 +99,7 @@ It is recommended to use a fully synced node, otherwise it can lead to instabili
9999
To mount Node data into the container use the following command:
100100

101101
```
102-
docker run --env-file ./docker/.env.dockerfile --env-file .env.docker-profile-entry-level -p 8082:8082 -v {node_snapshot}:/node/db -it {image_name}:latest
102+
docker run --env-file ./docker/.env.dockerfile --env-file .env.docker-profile-mid-level -p 8082:8082 --shm-size=4g -v {node_snapshot}:/node/db -it {image_name}:latest
103103
```
104104

105105
Relevant datapathes within the container:
@@ -114,7 +114,7 @@ Relevant datapathes within the container:
114114
The synchronization mode is to for users who don't have a fully synced node and need to start from scratch without using a snapshot.
115115

116116
```
117-
docker run -e SYNC=true --env-file .\docker\.env.dockerfile -p 8082:8082 -d {image_name}:latest
117+
docker run -e SYNC=true --env-file .\docker\.env.dockerfile -p 8082:8082 --shm-size=4g -d {image_name}:latest
118118
```
119119

120120
The container can be started in synchronization mode. In this case, the container will verify chunks and synchronize the node, when it reaches the tip, the API is started automatically.

0 commit comments

Comments
 (0)