GithubHelp home page GithubHelp logo

twente-mining / pepe-worker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cryptopepes/pepe-worker

0.0 1.0 0.0 4.6 MB

CryptoPepe worker service, create and push images to cloud storage

Go 99.05% Dockerfile 0.72% Shell 0.23%

pepe-worker's Introduction

Cryptopepes worker

This is the backend service that builds images and pushes them to google cloud storage.

Options:

--rpc=https://mainnet.infura.io/v3/API_KEY....
--token-address=0x84ac94f17622241f313511b629e5e98f489ad6e4
--sale-auction-address=0x28ae3df366726d248c57b19fa36f6d9c228248be
--cozy-auction-address=0xe2c43d2c6d6875c8f24855054d77b5664c7e810f

Deploy

Swap file creation

Swap required, because building takes a lot of memory

cd /var
touch swap.img
chmod 600 swap.img

# 4 GB of swap
dd if=/dev/zero of=/var/swap.img bs=1024k count=4000
mkswap /var/swap.img
swapon /var/swap.img
free

# Make swap persistent
echo "/var/swap.img    none    swap    sw    0    0" >> /etc/fstab

Creation of the Dokku app

# login
eval $(ssh-agent)
ssh-add <your key path>
ssh root@<ip address>

# --- in remote machine ---

# Create worker app
dokku apps:create worker

# Configure start

dokku config:set worker DOKKU_DOCKERFILE_START_CMD="--rpc=https://mainnet.infura.io/v3/API_KEY.... \
                                                    --token-address=0x84ac94f17622241f313511b629e5e98f489ad6e4 \
                                                    --sale-auction-address=0x28ae3df366726d248c57b19fa36f6d9c228248be \
                                                    --cozy-auction-address=0xe2c43d2c6d6875c8f24855054d77b5664c7e810f"


dokku config:set worker GOOGLE_APPLICATION_CREDENTIALS="secret-key-google.json"
dokku config:set worker APP_PATH="/app/"


dokku docker-options:add worker build "--build-arg GOOGLE_APPLICATION_CREDENTIALS=.............."
# Replace .............. with the long base64 encoded keyfile,
#  obtained and added to your clipboard by running this locally:
base64 secret-key-google.json | tr -d '\n' | xsel -bi

# back to local machine
> exit

Configure local repo.

# Go to project dir
git remote add ocean-worker dokku@<ip address>:worker

Pushing it live

# Deploy
git push ocean-worker master

pepe-worker's People

Contributors

programmerror avatar twente-mining avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.