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

feat: Add Dockerfile, DockerCompose with 2 sample .env #2

Open
wants to merge 2 commits into
base: main
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
10 changes: 10 additions & 0 deletions .env.mainnet.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
MNEMONIC="" # change me

NETWORK=mainnet

# RPC Endpoint (default unless defined)
# https://docs.kujira.app/validators/community-tooling
# https://docs.mintthemoon.xyz/kujira/resources/
#
# RPC_ENDPOINT=https://kujira.rpc.ghostinnet.com
# RPC_ENDPOINT=https://kujira-rpc.ibs.team
9 changes: 9 additions & 0 deletions .env.testnet.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MNEMONIC="" # change me

NETWORK=testnet

# RPC Endpoint (default unless defined)
# https://docs.kujira.app/validators/community-tooling
# https://docs.mintthemoon.xyz/kujira/resources/
#
# RPC_ENDPOINT=https://test-rpc-kujira.mintthemoon.xyz
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM node:19

ENV TERM=xterm
RUN mkdir /usr/src/app
WORKDIR /usr/src/app

COPY package*.json ./
RUN yarn install

#COPY .eslintrc ./
COPY tsconfig.json ./
COPY src ./src

#RUN yarn build

CMD ["yarn", "start"]
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,22 @@ This crank app uses a single "orchestrator" account, and sets up feegrants to al

Long-term this will be replaced by the on-chain scheduler. Until then, this app allows us to understand the dynamics of these crankers before committing to the scheduler.

## Setup
## Setup

1. Ensure that you have `MNEMONIC` available on your env for the orchestrator account
1. `yarn`
1. `NETWORK=mainnet yarn start`

NB: On first start, all the feegrants will be created which can take some time

### using Docker Compose

```sh
# create .env and config your mnemonic

# build and start
docker-compose up

# force rebuild with
docker-compose up --build
```
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3.9'

services:
crank:
build: .
image: kujira-crank
container_name: kujira-crank
env_file:
- .env
restart: always
stdin_open: true
tty: true