-
Notifications
You must be signed in to change notification settings - Fork 40
/
docker-compose.yml
144 lines (136 loc) · 4.99 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
version: '3'
networks:
mediator-network:
volumes:
agency-wallet:
mediator-controller-data:
# x-env: &defaults
# MEDIATOR_CONTROLLER_PORT: ${MEDIATOR_CONTROLLER_PORT:-3010}
services:
caddy:
image: caddy
hostname: caddy
networks:
- mediator-network
ports: # Uncomment to access caddy outside of containers
- 2015:2015
# - 2019:2019
volumes:
- ./caddy/Caddyfile:/etc/caddy/Caddyfile:z
healthcheck:
# Port 2019 is an internal Caddy admin port.
test: nc -zv localhost:2019 || exit -1
interval: 3s
timeout: 3s
start_period: 10s
retries: 5
ngrok:
image: ngrok/ngrok
restart: unless-stopped
hostname: ngrok
depends_on:
caddy:
condition: service_healthy
networks:
- mediator-network
environment:
- NGROK_AUTHTOKEN=${NGROK_AUTHTOKEN}
command: http caddy:2015 --log stdout
# ports: # Uncomment to access ngrok outside of containers
# - 4040:4040 # admin port
healthcheck:
test: /bin/bash -c "</dev/tcp/ngrok/4040"
interval: 3s
timeout: 3s
start_period: 5s
retries: 5
mediator-controller:
image: node:fermium
# restart: unless-stopped
profiles:
- donotstart
environment:
- PORT=${MEDIATOR_CONTROLLER_PORT:-3010}
- CONTROLLER_ADMIN_API_KEY=${MEDIATOR_CONTROLLER_ADMIN_API_KEY}
- MEDIATOR_ADMIN_URL=${MEDIATOR_AGENT_ADMIN_URL-http://mediator:3002}
- MEDIATOR_ADMIN_API_KEY=${MEDIATOR_AGENT_ADMIN_API_KEY}
- MEDIATOR_ALIAS=${MEDIATOR_ALIAS}
- LOG_LEVEL=${LOG_LEVEL}
volumes:
- ./acapy/controller:/usr/src/controller:z
- mediator-controller-data:/usr/src/controller/node_modules:z
# ports: # Uncomment to access controller outside of containers
# - ${MEDIATOR_CONTROLLER_PORT:-3010}:${MEDIATOR_CONTROLLER_PORT:-3010}
networks:
- mediator-network
working_dir: /usr/src/controller
entrypoint: /bin/bash
command: ["-c", "npm install; npm run dev"]
healthcheck:
test: /bin/bash -c "</dev/tcp/mediator-controller/3010"
interval: 5s
timeout: 5s
retries: 5
mediator:
build:
context: .
dockerfile: acapy/Dockerfile.acapy
depends_on:
# mediator-controller:
# condition: service_healthy
db:
condition: service_healthy
ngrok:
condition: service_healthy
restart: unless-stopped
environment:
- ENV=${ENV:-local}
- POSTGRESQL_HOST=${POSTGRESQL_HOST:-db}
- POSTGRESQL_PORT=${POSTGRESQL_PORT:-5432}
- ACAPY_WALLET_STORAGE_CONFIG={"url":"${POSTGRESQL_HOST:-db}:${POSTGRESQL_PORT:-5432}","wallet_scheme":"DatabasePerWallet"}
- ACAPY_WALLET_STORAGE_CREDS={"account":"${POSTGRESQL_USER:-postgres}","password":"${POSTGRESQL_PASSWORD:-development}","admin_account":"${POSTGRESQL_ADMIN_USER:-postgres}","admin_password":"${POSTGRESQL_ADMIN_PASSWORD:-development}"}
- ACAPY_WALLET_NAME=${MEDIATOR_WALLET_NAME:-mediator}
- ACAPY_WALLET_KEY=${MEDIATOR_WALLET_KEY:-testing}
- MEDIATOR_AGENT_HTTP_IN_PORT=${MEDIATOR_AGENT_HTTP_IN_PORT:-3000}
- MEDIATOR_AGENT_WS_IN_PORT=${MEDIATOR_AGENT_WS_IN_PORT:-3001}
- MEDIATOR_AGENT_HTTP_ADMIN_PORT=${MEDIATOR_AGENT_HTTP_ADMIN_PORT:-3002}
- MEDIATOR_AGENT_ADMIN_MODE=${MEDIATOR_AGENT_ADMIN_MODE:-admin-api-key 7gdmVBiJalMj52Oum50yD8neu/nxmv3/DTWcZPyKZ4K2UdNNwSPKgg==}
- MEDIATOR_AGENT_LABEL=${MEDIATOR_AGENT_LABEL:-Mediator}
- MEDIATOR_URL=${MEDIATOR_URL:-}
- MEDIATOR_ENDPOINT_URL=${MEDIATOR_ENDPOINT_URL:-localhost}
- MEDIATOR_ARG_FILE=${MEDIATOR_ARG_FILE:-./configs/mediator-auto-accept.yml}
- MEDIATOR_CONTROLLER_WEBHOOK=${MEDIATOR_CONTROLLER_WEBHOOK:-http://mediator-controller:3010/webhooks}
- MEDIATOR_AGENT_ADMIN_API_KEY=${MEDIATOR_AGENT_ADMIN_API_KEY}
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- USE_FIREBASE_PLUGIN=${USE_FIREBASE_PLUGIN:-false}
- FIREBASE_PROJECT_ID=${FIREBASE_PROJECT_ID}
- FIREBASE_NOTIFICATION_TITLE=${FIREBASE_NOTIFICATION_TITLE}
- FIREBASE_NOTIFICATION_BODY=${FIREBASE_NOTIFICATION_BODY}
- FIREBASE_SERVICE_ACCOUNT=${FIREBASE_SERVICE_ACCOUNT}
# ports: # Uncomment to access mediator outside of containers
# - ${MEDIATOR_AGENT_HTTP_ADMIN_PORT:-3002}:${MEDIATOR_AGENT_HTTP_ADMIN_PORT:-3002}
# - ${MEDIATOR_AGENT_HTTP_IN_PORT:-3000}:${MEDIATOR_AGENT_HTTP_IN_PORT:-3000}
# - ${MEDIATOR_AGENT_WS_IN_PORT:-3001}:${MEDIATOR_AGENT_WS_IN_PORT:-3001}
networks:
- mediator-network
healthcheck:
test: /bin/bash -c "</dev/tcp/mediator/3000"
interval: 5s
timeout: 5s
retries: 5
db:
image: postgres:15
# restart: always
environment:
POSTGRES_PASSWORD: ${POSTGRESQL_ADMIN_PASSWORD:-development}
# ports: # Uncomment to access postgres outside of containers
# - "5432:5432"
networks:
- mediator-network
volumes:
- agency-wallet:/var/lib/pgsql/data:z
healthcheck:
test: pg_isready -U postgres
interval: 3s
timeout: 3s
retries: 5