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

Add Docker and DockerCompose #1

Open
silvermind opened this issue Mar 5, 2023 · 0 comments · May be fixed by #2
Open

Add Docker and DockerCompose #1

silvermind opened this issue Mar 5, 2023 · 0 comments · May be fixed by #2

Comments

@silvermind
Copy link

Having a simple Dockerfile to build an image and a docker-compose with sample .env File could help for new developer to get started easily. Similar to the recent changes in the WhiteWhale Bot Repo: https://github.com/White-Whale-Defi-Platform/white-whale-bots

I've adapted these scripts below, Do you think it would help? If so, I will craft a MR for this.

Note: Atm the app is started just using "yarn start", the WhiteWhale Docker also added a "build" `script to packsage.json using "tsc" and then precompiling the app during docker build. No familiar with tsc, so I went the easy way. but using tsc might be the better way...

Dockerfile

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 (TBD)

CMD ["yarn", "start"]

docker-compose.yml

version: '3.9'

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

.env.kujira-mainnet.example

MNEMONIC="" ##change this

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant