Handshake Block Explorer
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
docs
hsdexplorer
kube
.gitignore
Dockerfile
LICENSE
Pipfile
Pipfile.lock
README.md
docker-compose.yml
local.env
skaffold.yaml

README.md

Handshake Explorer

This is a block explorer for the handshake project. It's built with python, django, and kubernetes. This is currently deployed to hnsxplorer.

Requirements

  • Docker

Local Setup

git clone git@github.com:tdickman/handshake-explorer.git
docker-compose up

This will start the django app, and all dependent services. See the comments in docker-compose.yml for more details. Most changes will be picked up automatically, but any scss changes will require you to stop the app and run the following:

docker-compose build
docker-compose up

Deployment

We use skaffold to deploy this app to a kubernetes cluster.

PASSWORD=$(openssl rand -base64 32)
kubectl create secret generic db --from-literal=password=$PASSWORD
kubectl create secret generic django --from-literal=secret-key=SECRET_KEY
k exec -it postgres-... bash
psql -v ON_ERROR_STOP=1 --username postgres -d postgres <<-EOSQL
  CREATE USER hnsxplorer_testnet with password '$PASSWORD';
  CREATE DATABASE hnsxplorer_testnet;
  GRANT ALL PRIVILEGES ON DATABASE hnsxplorer_testnet TO hnsxplorer_testnet;
EOSQL
skaffold run