Files
stacks-blockchain-api/docker-compose.yml

62 lines
1.5 KiB
YAML

version: '3.7'
services:
postgres:
image: "postgres:12.2"
ports:
- "5490:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: stacks_core_sidecar
POSTGRES_PORT: 5432
volumes:
- database-data:/var/lib/postgresql/data/ # persist data even if container shuts down
networks:
- backend
stacks-blockchain:
build:
context: ./stacks-blockchain/docker
command: wait-for-it.sh sidecar:3700 --strict -- blockstack-core testnet /app/config/Stacks.toml
restart: on-failure
environment:
STACKS_EVENT_OBSERVER: sidecar:3700
ports:
- "9000:9000"
volumes:
- ./stacks-blockchain/:/app/config
- ./stacks-blockchain/.chaindata:/tmp/stacks-blockchain-data
networks:
- backend
sidecar:
build:
context: .
environment:
PG_HOST: postgres
PG_PORT: 5490
PG_USER: postgres
PG_PASSWORD: postgres
PG_DB: stacks_core_sidecar
STACKS_SIDECAR_SOCKET_PORT: 3700
STACKS_SIDECAR_SOCKET_HOST: 0.0.0.0
STACKS_SIDECAR_API_PORT: 3999
STACKS_SIDECAR_API_HOST: 0.0.0.0
STACKS_SIDECAR_DB: memory
STACKS_CORE_RPC_HOST: stacks-blockchain
STACKS_CORE_RPC_PORT: 9000
NODE_ENV: development
ports:
- "3999:3999"
volumes:
- ./stacks-blockchain/:/app/config
networks:
- backend
depends_on:
- postgres
networks:
frontend:
backend:
volumes:
database-data: