Skip to content

Commit

Permalink
Hotfix/2.27.1 (hashgraph#4023)
Browse files Browse the repository at this point in the history
* add sort
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix filter data types
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix pagination
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix query filters for vp
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* unique values for filter addon
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix filters
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix filters
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix filters
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix filters
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* restore filters in strict mode
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* bump version
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* [skip ci] Add swagger.yaml

* Fix/indexer (hashgraph#4022)

* fix map loading [skip ci]

Signed-off-by: Artem Buslaev <[email protected]>

* fix overview cards [skip ci]

Signed-off-by: Artem Buslaev <[email protected]>

* added nats config [skip ci]

Signed-off-by: Artem Buslaev <[email protected]>

* added search page size [skip ci]

Signed-off-by: Artem Buslaev <[email protected]>

* added fixtures [skip ci]

Signed-off-by: Artem Buslaev <[email protected]>

* fix indexer docker dependencies [skip ci]

Signed-off-by: Artem Buslaev <[email protected]>

* Dockerfiles unification

* fix nats config [skip ci]

Signed-off-by: Artem Buslaev <[email protected]>

---------

Signed-off-by: Artem Buslaev <[email protected]>
Co-authored-by: Alexander Pyatakov <[email protected]>

* [skip ci] Add swagger.yaml

* fix indexer search bar in safari

Signed-off-by: Artem Buslaev <[email protected]>

* fix lint
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

---------

Signed-off-by: simvalery <[email protected]>
Signed-off-by: Artem Buslaev <[email protected]>
Co-authored-by: envision-ci-agent <[email protected]>
Co-authored-by: Artem Buslaev <[email protected]>
Co-authored-by: Alexander Pyatakov <[email protected]>
  • Loading branch information
4 people authored Aug 14, 2024
1 parent b0fa071 commit eaf24dc
Show file tree
Hide file tree
Showing 49 changed files with 524 additions and 317 deletions.
6 changes: 3 additions & 3 deletions ai-service/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "ai-service",
"version": "2.27.0",
"version": "2.27.1",
"main": "dist/app.js",
"license": "Apache-2.0",
"dependencies": {
"@guardian/common": "^2.27.0",
"@guardian/interfaces": "^2.27.0",
"@guardian/common": "^2.27.1",
"@guardian/interfaces": "^2.27.1",
"@mikro-orm/core": "6.2.2",
"@mikro-orm/mongodb": "6.2.2",
"@nestjs/common": "^9.4.1",
Expand Down
6 changes: 3 additions & 3 deletions analytics-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
},
"author": "Envision Blockchain Solutions <[email protected]>",
"dependencies": {
"@guardian/common": "^2.27.0",
"@guardian/interfaces": "^2.27.0",
"@guardian/common": "^2.27.1",
"@guardian/interfaces": "^2.27.1",
"@nestjs/common": "^9.4.1",
"@nestjs/core": "^9.4.1",
"@nestjs/jwt": "^10.0.3",
Expand Down Expand Up @@ -82,5 +82,5 @@
"test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml"
},
"type": "module",
"version": "2.27.0"
"version": "2.27.1"
}
6 changes: 3 additions & 3 deletions api-gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"@fastify/formbody": "^7.4.0",
"@fastify/multipart": "^8.2.0",
"@fastify/static": "^7.0.0",
"@guardian/common": "^2.27.0",
"@guardian/interfaces": "^2.27.0",
"@guardian/common": "^2.27.1",
"@guardian/interfaces": "^2.27.1",
"@nestjs/common": "^9.4.1",
"@nestjs/core": "^9.4.1",
"@nestjs/jwt": "^10.0.3",
Expand Down Expand Up @@ -88,5 +88,5 @@
"test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml"
},
"type": "module",
"version": "2.27.0"
"version": "2.27.1"
}
2 changes: 1 addition & 1 deletion api-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "api-tests",
"version": "2.27.0",
"version": "2.27.1",
"description": "API Tests",
"main": "index.js",
"type": "module",
Expand Down
6 changes: 3 additions & 3 deletions auth-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"image-size": "1.0.2"
},
"dependencies": {
"@guardian/common": "^2.27.0",
"@guardian/interfaces": "^2.27.0",
"@guardian/common": "^2.27.1",
"@guardian/interfaces": "^2.27.1",
"@meeco/cryppo": "^2.0.2",
"@mikro-orm/core": "6.2.2",
"@mikro-orm/mongodb": "6.2.2",
Expand Down Expand Up @@ -79,5 +79,5 @@
"test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml"
},
"type": "module",
"version": "2.27.0"
"version": "2.27.1"
}
4 changes: 2 additions & 2 deletions common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"@azure/identity": "^3.2.2",
"@azure/keyvault-secrets": "^4.7.0",
"@google-cloud/secret-manager": "^4.2.2",
"@guardian/interfaces": "^2.27.0",
"@guardian/interfaces": "^2.27.1",
"@hashgraph/sdk": "2.46.0",
"@mattrglobal/jsonld-signatures-bbs": "^1.1.2",
"@meeco/cryppo": "^2.0.2",
Expand Down Expand Up @@ -87,5 +87,5 @@
"test:stability": "mocha tests/stability.test.js"
},
"type": "module",
"version": "2.27.0"
"version": "2.27.1"
}
29 changes: 29 additions & 0 deletions configs/nats.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Client port of 4222 on all interfaces
port: 4222

# HTTP monitoring port
monitor_port: 8222

# This is for clustering multiple servers together.
cluster {
# It is recommended to set a cluster name
name: "my_cluster"

# Route connections to be received on any interface on port 6222
port: 6222

# Routes are protected, so need to use them with --routes flag
# e.g. --routes=nats-route://ruser:T0pS3cr3t@otherdockerhost:6222
authorization {
user: ruser
password: T0pS3cr3t
timeout: 2
}

# Routes are actively solicited and connected to from this server.
# This Docker image has none by default, but you can pass a
# flag to the nats-server docker image to create one to an existing server.
routes = []
}

max_payload: 64MB
24 changes: 13 additions & 11 deletions docker-compose-indexer.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: "3.8"
services:
mongo:
image: mongo:6.0.13
image: mongo:6.0.16
command: "--setParameter allowDiskUseByDefault=true"
restart: always
expose:
Expand All @@ -19,15 +18,17 @@ services:
- mongo

ipfs-node:
image: ipfs/kubo:latest
image: ipfs/kubo:v0.29.0

message-broker:
image: nats:2.9.24
image: nats:2.9.25
expose:
- 4222
ports:
- '8222:8222'
command: '--http_port 8222'
command: '-c /etc/nats/nats.conf --http_port 8222'
volumes:
- ./configs/nats.conf:/etc/nats/nats.conf

indexer-worker-service:
env_file:
Expand All @@ -39,15 +40,16 @@ services:
depends_on:
- mongo
- message-broker
- indexer-service
environment:
- GUARDIAN_ENV=${GUARDIAN_ENV}
expose:
- 6555
volumes:
- ./indexer-worker-service/tls:/usr/local/indexer-worker-service/tls:ro
- ./indexer-worker-service/configs:/usr/local/indexer-worker-service/configs:ro
- ./indexer-worker-service/tls:/usr/local/app/tls:ro
- ./indexer-worker-service/configs:/usr/local/app/configs:ro
deploy:
replicas: 5
replicas: 3

indexer-api-gateway:
env_file:
Expand All @@ -66,7 +68,7 @@ services:
environment:
- GUARDIAN_ENV=${GUARDIAN_ENV}
volumes:
- ./indexer-api-gateway/configs:/usr/local/indexer-api-gateway/configs:ro
- ./indexer-api-gateway/configs:/usr/local/app/configs:ro

indexer-service:
env_file:
Expand All @@ -76,8 +78,8 @@ services:
dockerfile: ./indexer-service/Dockerfile
init: true
volumes:
- ./indexer-service/tls:/usr/local/indexer-service/tls:ro
- ./indexer-service/configs:/usr/local/indexer-service/configs:ro
- ./indexer-service/tls:/usr/local/app/tls:ro
- ./indexer-service/configs:/usr/local/app/configs:ro
depends_on:
- mongo
- message-broker
Expand Down
4 changes: 3 additions & 1 deletion docker-compose-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ services:
- 4222
ports:
- '8222:8222'
command: '--http_port 8222'
command: '-c /etc/nats/nats.conf --http_port 8222'
volumes:
- ./configs/nats.conf:/etc/nats/nats.conf

vault:
image: hashicorp/vault:1.12.11
Expand Down
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ services:
- 4222
ports:
- '8222:8222'
command: '--http_port 8222'
command: '-c /etc/nats/nats.conf --http_port 8222'
volumes:
- ./configs/nats.conf:/etc/nats/nats.conf

vault:
image: hashicorp/vault:1.12.11
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@
"test": "ng test",
"watch": "ng build --watch --configuration development --output-path ../www-data"
},
"version": "2.27.0"
"version": "2.27.1"
}
6 changes: 3 additions & 3 deletions guardian-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"image-size": "1.0.2"
},
"dependencies": {
"@guardian/common": "^2.27.0",
"@guardian/interfaces": "^2.27.0",
"@guardian/common": "^2.27.1",
"@guardian/interfaces": "^2.27.1",
"@hashgraph/sdk": "2.46.0",
"@mattrglobal/jsonld-signatures-bbs": "^1.1.2",
"@meeco/cryppo": "^2.0.2",
Expand Down Expand Up @@ -99,5 +99,5 @@
"test:stability": "mocha tests/stability.test.mjs"
},
"type": "module",
"version": "2.27.0"
"version": "2.27.1"
}
108 changes: 55 additions & 53 deletions indexer-api-gateway/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,55 +1,57 @@
FROM node:20 AS interfacesModuleBuilder
WORKDIR /usr/local/indexer-interfaces
COPY ./indexer-interfaces/package.json ./
COPY ./indexer-interfaces/tsconfig*.json ./
COPY ./yarn.lock ./
COPY ./package-lock.json ./
ADD ./indexer-interfaces/src ./src/.
RUN yarn install
RUN yarn pack

FROM node:20 AS commonModuleBuilder
WORKDIR /usr/local/indexer-common
COPY --from=interfacesModuleBuilder /usr/local/indexer-interfaces/indexer-interfaces-*.tgz /tmp/indexer-interfaces.tgz
COPY ./indexer-common/package.json ./
COPY ./indexer-common/tsconfig*.json ./
COPY ./yarn.lock ./
COPY ./package-lock.json ./
RUN node -e "const fs=require('fs'); const input=JSON.parse(fs.readFileSync('package.json')); input.dependencies['@indexer/interfaces']='file:/tmp/indexer-interfaces.tgz'; fs.writeFileSync('package.json', JSON.stringify(input));"
RUN yarn install
ADD ./indexer-common/src ./src/.
RUN yarn pack

FROM node:20 AS apiGatewayBuilder
WORKDIR /usr/local/indexer-api-gateway
COPY --from=interfacesModuleBuilder /usr/local/indexer-interfaces/indexer-interfaces-*.tgz /tmp/indexer-interfaces.tgz
COPY --from=commonModuleBuilder /usr/local/indexer-common/indexer-common-*.tgz /tmp/indexer-common.tgz
COPY ./indexer-api-gateway/package.json ./
COPY ./indexer-api-gateway/tsconfig*.json ./
COPY ./indexer-api-gateway/Gulpfile.mjs ./
COPY ./yarn.lock ./
COPY ./package-lock.json ./
RUN node -e "const fs=require('fs'); const input=JSON.parse(fs.readFileSync('package.json')); input.dependencies['@indexer/interfaces']='file:/tmp/indexer-interfaces.tgz'; fs.writeFileSync('package.json', JSON.stringify(input));"
RUN node -e "const fs=require('fs'); const input=JSON.parse(fs.readFileSync('package.json')); input.dependencies['@indexer/common']='file:/tmp/indexer-common.tgz'; fs.writeFileSync('package.json', JSON.stringify(input));"
RUN yarn install
ADD ./indexer-api-gateway/environments ./environments/.
ADD ./indexer-api-gateway/src ./src/.
RUN yarn run build:prod

FROM node:20
ENV PLATFORM="docker"
ENV NODE_ENV="production"
WORKDIR /usr/local/indexer-api-gateway
COPY --from=interfacesModuleBuilder /usr/local/indexer-interfaces/indexer-interfaces-*.tgz /tmp/indexer-interfaces.tgz
COPY --from=commonModuleBuilder /usr/local/indexer-common/indexer-common-*.tgz /tmp/indexer-common.tgz
COPY --from=apiGatewayBuilder /usr/local/indexer-api-gateway/yarn.lock ./
COPY ./indexer-api-gateway/package.json ./
COPY ./yarn.lock ./
COPY ./package-lock.json ./
# syntax=docker/dockerfile:1
# Stage 0: Use node image for base image for all stages
ARG NODE_VERSION=20.16-alpine
FROM node:${NODE_VERSION} as base
WORKDIR /usr/local/app
# Define an argument `YARN_CACHE_FOLDER` for the Yarn cache directory
ARG YARN_CACHE_FOLDER=/root/.yarn

# Stage 1: Build interfaces module
FROM base as interfaces
COPY --link indexer-interfaces/package.json indexer-interfaces/tsconfig*.json yarn.lock ./
COPY --link indexer-interfaces/src src/
# Here and after. Leverage a cache mount to /root/.yarn to speed up subsequent builds
RUN --mount=type=cache,target=/root/.yarn \
yarn install --immutable && yarn pack

# Stage 2: Build common module
FROM base as common
COPY --link --from=interfaces /usr/local/app/indexer-interfaces-*.tgz /tmp/indexer-interfaces.tgz
COPY --link indexer-common/package.json indexer-common/tsconfig*.json yarn.lock ./
COPY --link indexer-common/src src/
RUN node -e "const fs=require('fs'); const input=JSON.parse(fs.readFileSync('package.json')); input.dependencies['@indexer/interfaces']='file:/tmp/indexer-interfaces.tgz'; fs.writeFileSync('package.json', JSON.stringify(input));"
RUN node -e "const fs=require('fs'); const input=JSON.parse(fs.readFileSync('package.json')); input.dependencies['@indexer/common']='file:/tmp/indexer-common.tgz'; fs.writeFileSync('package.json', JSON.stringify(input));"
RUN yarn install
COPY --from=apiGatewayBuilder /usr/local/indexer-api-gateway/dist ./dist
RUN rm /tmp/indexer-interfaces.tgz /tmp/indexer-common.tgz
RUN --mount=type=cache,target=/root/.yarn \
yarn install --immutable && yarn pack

# Stage 3: Installing production dependecies
FROM base as deps
COPY --link --from=interfaces /usr/local/app/indexer-interfaces-*.tgz /tmp/indexer-interfaces.tgz
COPY --link --from=common /usr/local/app/indexer-common-*.tgz /tmp/indexer-common.tgz
COPY --link indexer-api-gateway/package.json indexer-api-gateway/tsconfig*.json indexer-api-gateway/Gulpfile.mjs yarn.lock ./
RUN node -e "const fs=require('fs'); const input=JSON.parse(fs.readFileSync('package.json')); input.dependencies['@indexer/interfaces']='file:/tmp/indexer-interfaces.tgz'; input.dependencies['@indexer/common']='file:/tmp/indexer-common.tgz'; fs.writeFileSync('package.json', JSON.stringify(input));"
RUN --mount=type=cache,target=/root/.yarn,sharing=private \
yarn install --immutable --prod

# Stage 4: Build service
FROM base as build
COPY --link --from=interfaces /usr/local/app/indexer-interfaces-*.tgz /tmp/indexer-interfaces.tgz
COPY --link --from=common /usr/local/app/indexer-common-*.tgz /tmp/indexer-common.tgz
COPY --link --from=deps /usr/local/app/package.json /usr/local/app/tsconfig*.json /usr/local/app/Gulpfile.mjs /usr/local/app/yarn.lock ./
COPY --link indexer-api-gateway/environments environments/
COPY --link indexer-api-gateway/src src/
RUN --mount=type=cache,target=/root/.yarn \
yarn install --immutable && yarn run build:prod

# Stage 5: Create the final image
FROM base as image
ENV NODE_ENV production

# Copy the production dependencies from the deps stage and the built application from the build stage into the image
COPY --link --from=deps /usr/local/app/node_modules node_modules/
COPY --link --from=deps /usr/local/app/package.json ./
COPY --link --from=build /usr/local/app/dist dist/

# Change the user to node
USER node

CMD npm start
CMD [ "node", "dist/index.js" ]
6 changes: 3 additions & 3 deletions indexer-api-gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
},
"author": "Envision Blockchain Solutions <[email protected]>",
"dependencies": {
"@indexer/interfaces": "^2.27.0",
"@indexer/common": "^2.27.0",
"@indexer/interfaces": "^2.27.1",
"@indexer/common": "^2.27.1",
"@nestjs/common": "^9.4.1",
"@nestjs/core": "^9.4.1",
"@nestjs/microservices": "^9.4.1",
Expand Down Expand Up @@ -85,5 +85,5 @@
"test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml"
},
"type": "module",
"version": "2.27.0"
"version": "2.27.1"
}
Loading

0 comments on commit eaf24dc

Please sign in to comment.