Skip to content

Commit

Permalink
explorer exits due to ECONNREFUSED to port 5432 (#84)
Browse files Browse the repository at this point in the history
* explorer exits due to ECONNREFUSED to port 5432

This is due to explorer tries to connect to db before the db starts successfully.

Signed-off-by: zainabmurtaza <bzainab61@gmail.com>

* Update docker-compose.yaml

Signed-off-by: zainabmurtaza <bzainab61@gmail.com>

* Changed the time interval

Signed-off-by: zainabmurtaza <bzainab61@gmail.com>

*  sleep 16 is not required after pull-request#84

Signed-off-by: zainabmurtaza <bzainab61@gmail.com>
  • Loading branch information
JeevaSang committed Mar 5, 2020
1 parent d2af48b commit 4b00206
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ services:
- DATABASE_DATABASE=fabricexplorer
- DATABASE_USERNAME=hppoc
- DATABASE_PASSWORD=password
healthcheck:
test: "pg_isready -h localhost -p 5432 -q -U postgres"
interval: 30s
timeout: 10s
retries: 5
volumes:
- ./app/persistence/fabric/postgreSQL/db/createdb.sh:/docker-entrypoint-initdb.d/createdb.sh
- pgdata:/var/lib/postgresql/data
Expand All @@ -47,9 +52,12 @@ services:
- ./examples/net1/connection-profile:/opt/explorer/app/platform/fabric/connection-profile
- ./examples/net1/crypto:/tmp/crypto
- walletstore:/opt/wallet
command: sh -c "sleep 16&& node /opt/explorer/main.js && tail -f /dev/null"
command: sh -c "node /opt/explorer/main.js && tail -f /dev/null"
ports:
- 8090:8080
depends_on:
explorerdb.mynetwork.com:
condition: service_healthy
networks:
- mynetwork.com

Expand Down

0 comments on commit 4b00206

Please sign in to comment.