Skip to content

Commit

Permalink
chore: add postgres init.sql
Browse files Browse the repository at this point in the history
Signed-off-by: mhatal <100742635+mhatal@users.noreply.github.com>
  • Loading branch information
mhatal committed Mar 2, 2024
1 parent 39a2ce9 commit 922378a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ services:
volumes:
- ./postgresql:/var/lib/postgresql
- ./postgresql/data:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
stacks-blockchain-api:
restart: always
image: bestmike007/stacks-blockchain-api:7.8.2
Expand Down
1 change: 1 addition & 0 deletions init.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE SCHEMA stacks_blockchain_api;
2 changes: 1 addition & 1 deletion restore-archive-pg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if [ -e postresql ]; then
fi

mkdir postgresql
curl -o postgresql/latest.dump https://archive.hiro.so/mainnet/stacks-blockchain-api-pg/stacks-blockchain-api-pg-15-7.1.10-latest.dump
curl -o postgresql/latest.dump https://archive.hiro.so/mainnet/stacks-blockchain-api-pg/stacks-blockchain-api-pg-15-7.8.2-latest.dump

docker-compose up -d stacks-blockchain-postgres
WAIT_HOSTS='127.0.0.1:5432' ./wait
Expand Down
2 changes: 1 addition & 1 deletion start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
cd $DIR

docker-compose up -d
docker compose up -d
2 changes: 1 addition & 1 deletion stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ echo 'Stopping stacks-node, timeout: 60mins'
docker stop -t 3600 stacks_node
docker stop stacks_api
docker stop stacks_postgres
docker-compose down
docker compose down

0 comments on commit 922378a

Please sign in to comment.