Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Merge pull request #82 from LiskHQ/81-betanet
Browse files Browse the repository at this point in the history
Image for betanet - Closes #81
  • Loading branch information
fchavant authored Apr 25, 2018
2 parents 8d473ba + b85739a commit 77e3dac
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 1 deletion.
26 changes: 26 additions & 0 deletions examples/betanet/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.PHONY: clean coldstart mrproper up
all: up

lisk_net = beta
lisk_database = lisk_$(lisk_net)

blockchain.db.gz:
curl -O https://downloads.lisk.io/lisk/$(lisk_net)/blockchain.db.gz

up:
docker-compose up -d

coldstart: blockchain.db.gz up
docker-compose stop lisk
docker-compose start db
docker-compose run --rm task dropdb --if-exists $(lisk_database)
docker-compose run --rm task createdb $(lisk_database)
@echo Restoring database snapshot. This can take a few minutes.
gzip --decompress --to-stdout blockchain.db.gz |docker-compose run --rm task psql >/dev/null
docker-compose start lisk

clean:
rm -f blockchain.db.gz

mrproper: clean
docker-compose down --volumes
48 changes: 48 additions & 0 deletions examples/betanet/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
version: "2"
services:

lisk:
image: lisk/betanet:next
volumes:
- lisk-logs:/home/lisk/lisk/logs/
ports:
- "5000:5000"
- "5001:5001"
networks:
- lisk-beta
depends_on:
- db
command: ["/home/lisk/wait-for-it.sh", "db:5432", "--", "/home/lisk/run.sh"]
environment:
- LISK_CONFIG_DB_DATABASE=lisk_beta
restart: on-failure

db:
image: postgres:9.6-alpine
volumes:
- db-data:/var/lib/postgresql/data
networks:
- lisk-beta
restart: on-failure
environment:
- POSTGRES_DB=lisk_beta
- POSTGRES_PASSWORD=password
- POSTGRES_USER=lisk

task:
image: postgres:9.6-alpine
networks:
- lisk-beta
environment:
- PGUSER=lisk
- PGPASSWORD=password
- PGDATABASE=lisk_beta
- PGHOST=db
command: /bin/true

networks:
lisk-beta:

volumes:
db-data:
lisk-logs:
10 changes: 9 additions & 1 deletion images/lisk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ tag = next
clean:
rm -f *-lisk-Linux-x86_64.tar.gz*

betanet-lisk-Linux-x86_64.tar.gz:
curl --fail https://downloads.lisk.io/lisk/beta/lisk-Linux-x86_64.tar.gz --output betanet-lisk-Linux-x86_64.tar.gz
curl --fail https://downloads.lisk.io/lisk/beta/lisk-Linux-x86_64.tar.gz.SHA256 --output betanet-lisk-Linux-x86_64.tar.gz.SHA256
sed -i 's/ \(lisk-Linux-x86_64.tar.gz\)/ betanet-\1/' betanet-lisk-Linux-x86_64.tar.gz.SHA256
sha256sum -c betanet-lisk-Linux-x86_64.tar.gz.SHA256

betanet: betanet-lisk-Linux-x86_64.tar.gz
docker build --build-arg network=betanet --tag lisk/betanet:$(tag) .

development-lisk-Linux-x86_64.tar.gz:
curl --fail https://downloads.lisk.io/lisk/development/lisk-Linux-x86_64.tar.gz --output development-lisk-Linux-x86_64.tar.gz
curl --fail https://downloads.lisk.io/lisk/development/lisk-Linux-x86_64.tar.gz.SHA256 --output development-lisk-Linux-x86_64.tar.gz.SHA256
Expand All @@ -32,4 +41,3 @@ testnet-lisk-Linux-x86_64.tar.gz:

testnet: testnet-lisk-Linux-x86_64.tar.gz
docker build --tag lisk/testnet:$(tag) .

0 comments on commit 77e3dac

Please sign in to comment.