Skip to content

Commit

Permalink
Merge pull request #1020 from input-output-hk/docker-postgres-port
Browse files Browse the repository at this point in the history
Dockerised instance now exposes PostgresDb port to localhost
  • Loading branch information
catch-21 committed Jan 17, 2022
2 parents dfd0795 + 0a3b501 commit bf1847f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doc/docker.md
Expand Up @@ -13,10 +13,14 @@ cd cardano-db-sync
``` console
docker-compose up -d && docker-compose logs -f
```
### :tada
### tada:tada:

The PostgreSQL database is exposed on localhost port `5432`

### To connect to PostgreSQL database:

`$ psql -h 0.0.0.0 -p 5432 -U postgres -d cexplorer` (then enter secret password)

### To connect to another network:
```
NETWORK=testnet docker-compose up && docker-compose logs -f
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Expand Up @@ -12,6 +12,8 @@ services:
- postgres_password
- postgres_user
- postgres_db
ports:
- ${POSTGRES_PORT:-5432}:5432
volumes:
- postgres:/var/lib/postgresql/data
restart: on-failure
Expand Down

0 comments on commit bf1847f

Please sign in to comment.