This repository has been archived by the owner on Apr 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from LiskHQ/81-betanet
Image for betanet - Closes #81
- Loading branch information
Showing
3 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters