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

Configure blockmeta to run for subsocial #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
node_modules
.env

.idea

# Logs
logs
*.log
8 changes: 4 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
WS_ENDPOINT=wss://karura.api.onfinality.io/public-ws
WS_ENDPOINT=wss://para.f3joule.space

MONGO_URL=mongodb://127.0.0.1:27017
MONGO_DB_NAME=meta-karura
MONGO_DB_NAME=meta-subsocial

# karura|phala|khala|basilisk|kintsugi|bifrost|acala|interlay|sora|crab|litmus|zeitgeist|litentry|moonriver
CHAIN=karura
CHAIN=subsocial

SCAN_STEP=100
SCAN_FROM_LATEST=1
SCAN_FROM_LATEST=0

SAVE_VALIDATOR=true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ node_modules
.env
log
.DS_Store
.idea

*-image.sh
*.deploy.sh
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# Dockerfile

# base image
FROM node:alpine
FROM node:18-alpine3.18

# create & set working directory
RUN mkdir -p /usr/src
WORKDIR /usr/src
RUN mkdir -p /usr/blockmeta
WORKDIR /usr/blockmeta

# copy source files
COPY . /usr/src
COPY package.json /usr/blockmeta/

# install dependencies
RUN yarn install

CMD yarn run start
COPY src/ /usr/blockmeta/src/

CMD ["node", "src/index.js"]
17 changes: 17 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: '3.7'

services:
blockmeta:
image: dappforce/statescan-blockmeta:latest
build:
dockerfile: Dockerfile
container_name: statescan-blockmeta
restart: always
network_mode: host
environment:
MONGO_URL: mongodb://127.0.0.1:27100
MONGO_DB_NAME: meta-subsocial
WS_ENDPOINT: wss://para.f3joule.space
SCAN_STEP: 300
SCAN_FROM_LATEST: 0
SAVE_VALIDATOR: "true"
Loading