Skip to content

TimoGlastra/acapy-development-webhook-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ACA-Py Development Webhook Server

An easy-to-use webhook server to use for ACA-Py development. It will listen for requests and visualizes them in a dashboard.

Uses MockServer under the hood.

Usage

docker run -p 1080:1080 ghcr.io/timoglastra/acapy-development-webhook-server

Then point the --webhook-url to the docker container.

aries_cloudagent start ... --webhook-url http://localhost:1080

You can optionally add an extra path to distinguish between different agents:

# You can detect agent1 webhook events by the /agent1 path
aries_cloudagent start ... --webhook-url http://localhost:1080/agent1

# Same for agent2 webhook events by the /agent2 path
aries_cloudagent start ... --webhook-url http://localhost:1080/agent2

ACA-Py inside docker

If you run ACA-Py in a docker container (e.g. using the ./scripts/run_docker script in the ACA-Py repo) you need to use the docker host instead of localhost. Beware that you need to use the internal docker port now, so if you changed the -p 1080:1080 to something else (like -p 3000:1080) you still need to use 1080 when running ACA-Py inside docker

export DOCKERHOST=$(docker run --rm --net=host eclipse/che-ip)

aries_cloudagent start ... --webhook-url http://${DOCKERHOST}:1080

Docker Compose

You can also use docker-compose. This way you don't need to use the DOCKERHOST variable. See ./docker-compose.yml for a working example.

version: "3.5"

services:
  aca-py:
    # Use any version you like
    image: bcgovimages/aries-cloudagent:py36-1.15-0_0.5.6
    ports:
      - "3001:3001"
      - "3000:3000"
    entrypoint: aca-py start ... --webhook-url http://webhook-server:1080

  webhook-server:
    image: ghcr.io/timoglastra/acapy-development-webhook-server
    ports:
      - 1080:1080

Preview

MockServer Preview