-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add sort Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> * fix filter data types Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> * fix pagination Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> * fix query filters for vp Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> * unique values for filter addon Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> * fix filters Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> * fix filters Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> * fix filters Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> * fix filters Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> * restore filters in strict mode Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> * bump version Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> * [skip ci] Add swagger.yaml * Fix/indexer (#4022) * fix map loading [skip ci] Signed-off-by: Artem Buslaev <artem.buslaev@envisionblockchain.com> * fix overview cards [skip ci] Signed-off-by: Artem Buslaev <artem.buslaev@envisionblockchain.com> * added nats config [skip ci] Signed-off-by: Artem Buslaev <artem.buslaev@envisionblockchain.com> * added search page size [skip ci] Signed-off-by: Artem Buslaev <artem.buslaev@envisionblockchain.com> * added fixtures [skip ci] Signed-off-by: Artem Buslaev <artem.buslaev@envisionblockchain.com> * fix indexer docker dependencies [skip ci] Signed-off-by: Artem Buslaev <artem.buslaev@envisionblockchain.com> * Dockerfiles unification * fix nats config [skip ci] Signed-off-by: Artem Buslaev <artem.buslaev@envisionblockchain.com> --------- Signed-off-by: Artem Buslaev <artem.buslaev@envisionblockchain.com> Co-authored-by: Alexander Pyatakov <alex.pyatakov@envisionblockchain.com> * [skip ci] Add swagger.yaml * fix indexer search bar in safari Signed-off-by: Artem Buslaev <artem.buslaev@envisionblockchain.com> * fix lint Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> --------- Signed-off-by: simvalery <valeriy.simonov@envisionblockchain.com> Signed-off-by: Artem Buslaev <artem.buslaev@envisionblockchain.com> Co-authored-by: envision-ci-agent <envision-ci-agent@users.noreply.github.com> Co-authored-by: Artem Buslaev <artem.buslaev@envisionblockchain.com> Co-authored-by: Alexander Pyatakov <alex.pyatakov@envisionblockchain.com>
- Loading branch information
1 parent
b0fa071
commit eaf24dc
Showing
49 changed files
with
524 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.