Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docker/docker-compose.dev.postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,17 @@ services:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: stacks_blockchain_api
POSTGRES_PORT: 5432
healthcheck:
test: ["CMD-SHELL", "cat /ready.txt && pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
entrypoint: [
"/bin/bash",
"-c",
"docker-entrypoint.sh postgres & rm -f /ready.txt || true && until pg_isready -U postgres; do sleep 3; done &&
psql -U postgres -d stacks_blockchain_api -c 'CREATE SCHEMA IF NOT EXISTS stacks_blockchain_api;' || true &&
echo 'done' > /ready.txt && wait"
]
volumes:
- ../tests/event-replay/.tmp/local/:/root/
14 changes: 13 additions & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ services:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: stacks_blockchain_api
POSTGRES_PORT: 5432
healthcheck:
test: ["CMD-SHELL", "cat /ready.txt && pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
entrypoint: [
"/bin/bash",
"-c",
"docker-entrypoint.sh postgres & rm -f /ready.txt || true && until pg_isready -U postgres; do sleep 3; done &&
psql -U postgres -d stacks_blockchain_api -c 'CREATE SCHEMA IF NOT EXISTS stacks_blockchain_api;' || true &&
echo 'done' > /ready.txt && wait"
]
networks:
- backend
stacks-blockchain:
Expand Down Expand Up @@ -52,7 +64,7 @@ services:
- ../stacks-blockchain/:/app/config
networks:
- backend
depends_on:
depends_on:
- postgres

networks:
Expand Down