Skip to content
Permalink
Browse files

updated prysm; added lighthouse but getting db error

  • Loading branch information
mkinney committed Dec 20, 2019
1 parent 8079cb9 commit 79e04d3705ad0d5885abc0756c857f5f3c9089b4
@@ -56,7 +56,7 @@ We currently do not provide any pre-built binaries of the explorer. Docker image
## Development
Install golint. (see https://github.com/golang/lint)

- Install docker-compose and run `docker-compose up` if you want to spin up a complete environment based on prysm in docker. After the beacon node starts to sync, visit http://localhost:3333
- Install docker-compose and run `docker-compose up` in the prysm directory if you want to spin up a complete environment based on prysm in docker. After the beacon node starts to sync, visit http://localhost:3333 . If you want a complete Lighthouse environment, change into the lighthouse directory, run `docker-compose build`, and then run "export EP=`date +%s`; docker-compose up". Visit http://localhost:3334 for the explorer.

## Commercial usage
The explorer uses Highsoft charts which are not free for commercial and governmental use. If you plan to use the explorer for commercial purposes you currently need to purchase an appropriate HighSoft license.
@@ -0,0 +1,34 @@
# Database credentials
database:
user: "explorer"
name: "explorer"
host: "postgreslighthouse"
#port: "5432"
password: "secret"

# Chain network configuration (example will work for the prysm testnet)
chain:
slotsPerEpoch: 8
secondsPerSlot: 12
genesisTimestamp: 1573489682

# Note: It is possible to run either the frontend or the indexer or both at the same time
# Frontend config
frontend:
enabled: true # Enable or disable to web frontend
imprint: "templates/imprint.example.html" # Path to the imprint page content
siteName: "Ethereum 2.0 Beacon Chain (Phase 0) Block Chain Explorer" # Name of the site, displayed in the title tag
siteSubtitle: "Showing the <a href='https://prylabs.net'>💎 Prysm Eth2 Testnet</a>" # Subtitle shown on the main page
server:
host: "0.0.0.0" # Address to listen on
port: "3334" # Port to listen on

# Indexer config
indexer:
enabled: true # Enable or disable the indexing service
fullIndexOnStartup: false # Perform a one time full db index on startup
indexMissingEpochsOnStartup: false # Check for missing epochs and export them after startup
node:
host: "http://beaconnodelighthouse" # Address of the backend node
port: "5052" # port of the backend node
type: "lighthouse" # can be either prysm or lighthouse
@@ -0,0 +1,43 @@
version: '2.4'
services:

beaconnodelighthouse:
image: sigp/lighthouse
# ports:
# - "5052:5052"
# - "9000:9000"
command: lighthouse bn --http-address 0.0.0.0 --ws-address 0.0.0.0 --http testnet -r quick 8 ${EP}
restart: on-failure

postgreslighthouse:
image: postgres
environment:
- POSTGRES_PASSWORD=secret
- POSTGRES_USER=explorer
- POSTGRES_DB=explorer
volumes:
- ../tables.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U explorer"]
interval: 5s
timeout: 5s
retries: 5

explorerlighthouse:
build:
context: ../
ports:
- "3334:3334"
restart: on-failure
links:
- postgreslighthouse
- beaconnodelighthouse
depends_on:
postgreslighthouse:
condition: service_healthy
beaconnodelighthouse:
condition: service_started
volumes:
- ./config-for-docker-compose.yml:/app/config.yml
command:
/app/explorer -config /app/config.yml
@@ -2,7 +2,7 @@
database:
user: "explorer"
name: "explorer"
host: "postgres"
host: "postgres_prysm"
#port: "<dbport>"
password: "secret"

@@ -29,6 +29,6 @@ indexer:
fullIndexOnStartup: false # Perform a one time full db index on startup
indexMissingEpochsOnStartup: false # Check for missing epochs and export them after startup
node:
host: "prysm" # Address of the backend node
host: "beaconnode_prysm" # Address of the backend node
port: "4000" # port of the backend node
type: "prysm" # can be either prysm or lighthouse
@@ -1,7 +1,7 @@
version: '2.4'
services:

prysm:
beaconnode_prysm:
image: gcr.io/prysmaticlabs/prysm/beacon-chain:latest
ports:
- "4000:4000"
@@ -10,32 +10,34 @@ services:
- $HOME/prysm-data:/data
command: --archive --grpc-gateway-port=7000 --datadir=/data

postgres:
postgres_prysm:
image: postgres
environment:
- POSTGRES_PASSWORD=secret
- POSTGRES_USER=explorer
- POSTGRES_DB=explorer
volumes:
- ./tables.sql:/docker-entrypoint-initdb.d/init.sql
- ../tables.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U explorer"]
interval: 5s
timeout: 5s
retries: 5

explorer:
build: .
build:
context: ../
ports:
- "3333:3333"
links:
- postgres
- postgres_prysm
- beaconnode_prysm
depends_on:
postgres:
postgres_prysm:
condition: service_healthy
prysm:
beaconnode_prysm:
condition: service_started
volumes:
- ./config-for-docker-compose.yml:/app/config.yml
- ./config-for-docker-compose.yml:/app/config.yml
command:
/app/explorer -config /app/config.yml

0 comments on commit 79e04d3

Please sign in to comment.
You can’t perform that action at this time.