This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yaml
117 lines (112 loc) · 4.26 KB
/
docker-compose.yaml
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
version: "3"
services:
controller:
image: dav-controller
entrypoint: /bin/bash
command: >
-c "
if [ $DEBUGGER ] && [ "$DEBUGGER" == "true" ]; then
echo 'Starting in debug mode...'
pip install debugpy -t /tmp && \
python /tmp/debugpy --wait-for-client --listen 0.0.0.0:5678 -m uvicorn api.main:app --reload --host 0.0.0.0 --port 5000;
else
echo 'Starting in production mode...'
uvicorn api.main:app --reload --host 0.0.0.0 --port 5000;
fi"
environment:
- DEBUGGER=${DEBUGGER}
- LOG_LEVEL=${LOG_LEVEL}
- LOG_WITH_JSON=${LOG_WITH_JSON}
- DB_HOST=${MONGODB_HOST}
- DB_PORT=${MONGODB_PORT}
- DB_NAME=${MONGODB_NAME}
- DAV_CONTROLLER_DB_USER=${DAV_CONTROLLER_DB_USER}
- DAV_CONTROLLER_DB_USER_PWD=${DAV_CONTROLLER_DB_USER_PWD}
- CONTROLLER_URL=${CONTROLLER_URL}
- CONTROLLER_CAMERA_REDIRECT_URL=${CONTROLLER_CAMERA_REDIRECT_URL}
- CONTROLLER_PRESENTATION_EXPIRE_TIME=${CONTROLLER_PRESENTATION_EXPIRE_TIME}
- ACAPY_TENANCY=${AGENT_TENANT_MODE}
- ACAPY_AGENT_URL=${AGENT_ENDPOINT}
- ACAPY_ADMIN_URL=${AGENT_ADMIN_URL}
- MT_ACAPY_WALLET_ID=${MT_ACAPY_WALLET_ID}
- MT_ACAPY_WALLET_KEY=${MT_ACAPY_WALLET_KEY}
- ST_ACAPY_ADMIN_API_KEY=${AGENT_ADMIN_API_KEY}
- ST_ACAPY_ADMIN_API_KEY_NAME=${ST_ACAPY_ADMIN_API_KEY_NAME}
- USE_OOB_PRESENT_PROOF=${USE_OOB_PRESENT_PROOF}
- DAV_PROOF_CONFIG_ID=${DAV_PROOF_CONFIG_ID}
ports:
- ${CONTROLLER_SERVICE_PORT}:5000
- 5678:5678
volumes:
- ../dav-controller:/app:rw
- ./dav-controller/proof_config_nonprod.yaml:/app/api/proof_config.yaml
networks:
- dav_controller
controller-db:
image: mongo:6.0
environment:
- MONGO_INITDB_ROOT_USERNAME=${DAV_CONTROLLER_DB_USER}
- MONGO_INITDB_ROOT_PASSWORD=${DAV_CONTROLLER_DB_USER_PWD}
- MONGO_INITDB_DATABASE=${MONGODB_NAME}
volumes:
- controller-db-data:/data/db
- ./mongo/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
ports:
- ${MONGODB_PORT}:27017
restart: unless-stopped
networks:
- dav_controller
aca-py:
image: ghcr.io/hyperledger/aries-cloudagent-python:py3.9-0.12.1
environment:
- ACAPY_LABEL=${AGENT_NAME}
- ACAPY_ENDPOINT=${AGENT_ENDPOINT}
- ACAPY_WALLET_NAME=dav_agent_wallet
- ACAPY_WALLET_TYPE=askar
- ACAPY_WALLET_KEY=${WALLET_ENCRYPTION_KEY}
- ACAPY_WALLET_SEED=${AGENT_WALLET_SEED}
- ACAPY_WALLET_LOCAL_DID=true
- ACAPY_AUTO_VERIFY_PRESENTATION=true
- ACAPY_WALLET_STORAGE_TYPE=${WALLET_TYPE}
- ACAPY_READ_ONLY_LEDGER=true
- ACAPY_GENESIS_TRANSACTIONS_LIST=/tmp/ledgers.yaml
- ACAPY_LOG_LEVEL=info
- ACAPY_WEBHOOK_URL=${CONTROLLER_WEB_HOOK_URL}
- ACAPY_AUTO_PROVISION=true
- POSTGRESQL_WALLET_HOST=${POSTGRESQL_WALLET_HOST}
- POSTGRESQL_WALLET_PORT=${POSTGRESQL_WALLET_PORT}
- POSTGRESQL_WALLET_USER=${POSTGRESQL_WALLET_USER}
- POSTGRESQL_WALLET_PASSWORD=${POSTGRESQL_WALLET_PASSWORD}
ports:
- ${AGENT_ADMIN_PORT}:${AGENT_ADMIN_PORT}
- ${AGENT_HTTP_PORT}:${AGENT_HTTP_PORT}
networks:
- dav_controller
volumes:
- ./agent/config/ledgers-nonprod.yaml:/tmp/ledgers.yaml
depends_on:
- wallet-db
entrypoint: /bin/bash
command:
[
"-c",
'sleep 15; aca-py start --inbound-transport http ''0.0.0.0'' ${AGENT_HTTP_PORT} --outbound-transport http --wallet-storage-config ''{"url":"${POSTGRESQL_WALLET_HOST}:${POSTGRESQL_WALLET_PORT}","max_connections":5}'' --wallet-storage-creds ''{"account":"${POSTGRESQL_WALLET_USER}","password":"${POSTGRESQL_WALLET_PASSWORD}","admin_account":"${POSTGRESQL_WALLET_USER}","admin_password":"${POSTGRESQL_WALLET_PASSWORD}"}'' --admin ''0.0.0.0'' ${AGENT_ADMIN_PORT} --${AGENT_ADMIN_MODE} ',
]
wallet-db:
image: postgres:15.1-alpine
environment:
- POSTGRES_USER=${POSTGRESQL_WALLET_USER}
- POSTGRES_PASSWORD=${POSTGRESQL_WALLET_PASSWORD}
- POSTGRES_DB=${POSTGRESQL_WALLET_DATABASE}
networks:
- dav_controller
ports:
- 5433:5432
volumes:
- agent-wallet-db:/var/lib/pgsql/data
networks:
dav_controller:
driver: bridge
volumes:
controller-db-data:
agent-wallet-db: