This repository has been archived by the owner on Feb 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added separate docker compose file for building from source
- Loading branch information
Showing
3 changed files
with
123 additions
and
16 deletions.
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 |
---|---|---|
@@ -1,20 +1,36 @@ | ||
# Polkascan PRE | ||
Polkascan PRE Main Application | ||
|
||
## Run application | ||
## Run application (Prebuilt Docker Hub images) | ||
|
||
* During the first run let MySQL initialize (wait for 30 seconds) | ||
|
||
```bash | ||
docker-compose up -d mysql | ||
``` | ||
|
||
* Then start the other docker containers | ||
```bash | ||
docker-compose up | ||
``` | ||
|
||
## Run application (Build from source) | ||
|
||
* Make sure to also clone submodules within the cloned directory: | ||
```bash | ||
git submodule update --init --recursive | ||
``` | ||
* During the first run let MySQL initialize (wait for 30 seconds) | ||
|
||
```bash | ||
docker-compose up -d mysql | ||
docker-compose -f docker-compose.dev.yml up -d mysql | ||
``` | ||
* Then start the docker containers | ||
* Then build the other docker containers | ||
```bash | ||
docker-compose up --build | ||
docker-compose -f docker-compose.dev.yml up --build | ||
``` | ||
## Links | ||
|
||
* Polkascan Explorer GUI: http://127.0.0.1:8080 | ||
* Harvester task monitor: http://127.0.0.1:5555 | ||
* Harvester progress: http://127.0.0.1:8080/harvester/admin |
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,97 @@ | ||
version: '3.2' | ||
|
||
services: | ||
|
||
explorer-api: | ||
build: explorer-api/. | ||
image: polkascan/pre-explorer-api:milestone1 | ||
ports: | ||
- '8001:8000' | ||
volumes: | ||
- './explorer-api:/usr/src/app' | ||
command: ./start.sh | ||
environment: | ||
- PYTHONPATH=/usr/src/app | ||
- ENVIRONMENT=dev | ||
depends_on: | ||
- mysql | ||
|
||
harvester-api: | ||
build: harvester/. | ||
image: polkascan/pre-harvester:milestone1 | ||
ports: | ||
- '8000:8000' | ||
volumes: | ||
- './harvester:/usr/src/app' | ||
command: ./start.sh | ||
environment: &env | ||
- CELERY_BROKER=redis://redis:6379/0 | ||
- CELERY_BACKEND=redis://redis:6379/0 | ||
- PYTHONPATH=/usr/src/app | ||
- ENVIRONMENT=dev | ||
depends_on: | ||
- redis | ||
- mysql | ||
- substrate-node | ||
|
||
harvester-worker: | ||
build: harvester/. | ||
image: polkascan/pre-harvester:milestone1 | ||
volumes: | ||
- './harvester:/usr/src/app' | ||
command: celery -A app.tasks worker --loglevel=INFO | ||
environment: *env | ||
depends_on: | ||
- redis | ||
- mysql | ||
|
||
harvester-beat: | ||
build: harvester/. | ||
image: polkascan/pre-harvester:milestone1 | ||
volumes: | ||
- './harvester:/usr/src/app' | ||
- './data/celerybeat:/usr/src/app/data' | ||
command: celery -A app.tasks beat --loglevel=INFO --schedule="data/celerybeat-schedule" --pidfile="data/celerybeat.pid" | ||
environment: *env | ||
depends_on: | ||
- redis | ||
|
||
harvester-monitor: | ||
build: harvester/. | ||
image: polkascan/pre-harvester:milestone1 | ||
ports: | ||
- '5555:5555' | ||
command: flower -A app.tasks --port=5555 --broker=redis://redis:6379/0 | ||
depends_on: | ||
- redis | ||
|
||
redis: | ||
image: redis:3.2.11 | ||
|
||
mysql: | ||
image: mysql:latest | ||
volumes: | ||
- './data/mysql:/var/lib/mysql' | ||
ports: | ||
- '33061:3306' | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=root | ||
- MYSQL_DATABASE=polkascan | ||
|
||
substrate-node: | ||
image: polkasource/substrate-alexander:latest | ||
volumes: | ||
- './data/substrate:/data' | ||
ports: | ||
- '30333:30333' | ||
- '9933:9933' | ||
- '9944:9944' | ||
command: --dev --rpc-port 9933 --rpc-external --pruning=10000000 | ||
|
||
explorer-gui: | ||
image: polkascan/pre-explorer-gui:milestone1 | ||
build: explorer-gui/. | ||
ports: | ||
- '8080:80' | ||
depends_on: | ||
- harvester-api |
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