version: "3.5"

services:
  redis:
    image: redis:7.0
    command: redis-server --save 60 1 --loglevel warning
    volumes:
      - redis-data:/data

  guardian-spy:
    image: ghcr.io/wormhole-foundation/guardiand:main
    entrypoint: /guardiand
    command: ${GUARDIAN_SPY_COMMAND:-spy --nodeKey /node.key --spyRPC "[::]:7073" --network /wormhole/testnet/2/1 --bootstrap /dns4/wormhole-testnet-v2-bootstrap.certus.one/udp/8999/quic/p2p/12D3KooWBY9ty9CXLBXGQzMuqkziLntsVcyz4pk1zWaJRvJn6Mmt}

  spy-relayer:
    build:
      context: .
      target: application
    image: wormhole-relayer:main
    command: ${SPY_RELAYER_COMMAND:-npm run spy_relay}
    environment:
      - SPY_RELAY_CONFIG=/app/.env.docker.sample
    ports:
      - 8083:8083
      - 4201:4201
    volumes:
      - .env.docker.sample:/app/.env.docker.sample

volumes:
  redis-data:
