version: "3.8"
services:
  polkadot:
    container_name: polkadot
    image: docker.io/parity/polkadot:latest
    volumes:
      - ~/polkadot-data:/data
    # ports:
    #   - "9944:9944"
    command: '--chain polkadot --unsafe-rpc-external --rpc-cors=all'

  sidecar:
    # build: .
    image: docker.io/parity/substrate-api-sidecar:latest
    read_only: true
    ports:
      - "8080:8080"
    environment:
      SAS_SUBSTRATE_URL: ws://polkadot:9944
