Skip to content

Commit

Permalink
Merge pull request #2 from decentralised-dataexchange/add-agent3-for-…
Browse files Browse the repository at this point in the history
…travel-company

Add agent3 for travel company
  • Loading branch information
lalc authored Aug 24, 2020
2 parents 65520b2 + e1c525a commit 7668f00
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
* agent1.swagger.localhost (Administration API(s) with swagger UI)
* agent2.localhost (Agent2 service endpoint)
* agent2.swagger.localhost (Administration API(s) with swagger UI)
* agent3.swagger.localhost (Administration API(s) with swagger UI)
* agent1.webhook (For capturing webhook events)
* agent2.webhook (For capturing webhook events)
* agent3.webhook (For capturing webhook events)

*Notes* : By default the agents are pointed to indy ledger hosted at https://indy.igrant.io,
You can always change this to your ledger of choice by updating *GENESIS_URL* environment variable in docker-compose.yml file
Expand All @@ -18,6 +20,7 @@ A webhook interceptor is provided to debug the webhook events. It can be accesse

1. `docker exec -it agent1.webhook tail -f demo.log` - For viewing webhook events for agent1
2. `docker exec -it agent2.webhook tail -f demo.log` - For viewing webhook events for agent2
3. `docker exec -it agent2.webhook tail -f demo.log` - For viewing webhook events for agent2

#### Configuring the agent startup

Expand Down
22 changes: 22 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,28 @@ services:
networks:
- von_von

agent3.localhost:
image: georgejpadayatti/aries-cloudagent:0.5.3
command: /bin/bash -c "./startup.sh"
container_name: agent3.localhost
environment:
AGENT_NAME: Travel-Company
ACAPY_ENDPOINT: http://agent3.localhost
GENESIS_URL: https://indy.igrant.io/genesis
WEBHOOK_URL: http://agent3.webhook:8080
volumes:
- ./cloud-agent/startup.sh:/home/indy/startup.sh
networks:
- von_von

agent3.webhook:
image: georgejpadayatti/aries-webhook-interceptor:0.1
container_name: agent3.webhook
ports:
- 8083:8080
networks:
- von_von

networks:
von_von:
external: true
30 changes: 30 additions & 0 deletions nginx/conf.d/acapy.conf
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,33 @@ server {
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';
}
}

server {
listen 80;
listen [::]:80;
server_name agent3.localhost;

location / {
proxy_pass http://agent3.localhost;

add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';
}
}

server {
listen 80;
listen [::]:80;
server_name agent3.swagger.localhost;

location / {
proxy_pass http://agent3.localhost:8001;

add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';
}
}
30 changes: 30 additions & 0 deletions nginx/conf.d/acapy.template
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,33 @@ server {
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';
}
}

server {
listen 80;
listen [::]:80;
server_name agent3.localhost;

location / {
proxy_pass http://agent3.localhost;

add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';
}
}

server {
listen 80;
listen [::]:80;
server_name agent3.swagger.localhost;

location / {
proxy_pass http://agent3.localhost:8001;

add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';
}
}

0 comments on commit 7668f00

Please sign in to comment.