-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
157 lines (147 loc) · 4.36 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
145
146
147
148
149
150
151
152
153
154
155
156
157
version: '3.8'
services:
portal:
container_name: ${COMPOSE_PROJECT_NAME}-portal
build:
context: .
dockerfile: ${NICE_AGENT_ROLE}.Dockerfile
image: digicatapult/nice-agent-portal-${NICE_AGENT_ROLE}:${NICE_AGENT_VER-latest}
restart: on-failure
depends_on:
veritable:
condition: service_healthy
ports:
- '${NICE_PORT_HOST-3000}:3000'
volumes:
- ./.env.${COMPOSE_PROJECT_NAME}.local:/app/.env
environment:
- CLOUDAGENT_HOST
- DB_HOST
- DB_PORT
- DB_USERNAME
- DB_PASSWORD
- DB_NAME
- STATIC_ROOT
- DATABASE_URL
- ISSUER_HOST
- ISSUER_PORT
- CHAINVINE_HOST
- CHAINVINE_PORT
env_file:
- .env.${COMPOSE_PROJECT_NAME}.local
command: [sh, -c, 'npx prisma migrate deploy && npm start']
networks: ['nice-net', 'agent-net']
veritable:
container_name: ${COMPOSE_PROJECT_NAME}-veritable
image: digicatapult/veritable-cloudagent:v0.8.2
restart: on-failure
depends_on:
ipfs:
condition: service_healthy
opa:
condition: service_started
postgres:
condition: service_healthy
postgres-veritable:
condition: service_healthy
volumes:
- ./cloudagentConfig.json:/config.json
- veritable-filesystem:/root/.afj
ports:
# - '5022:5002'
# - '5023:5003'
- '${VERITABLE_PORT_HOST-3010}:3000'
environment:
- AFJ_REST_LOG_LEVEL=1
# or via command line arguments
command: --endpoint "http://${COMPOSE_PROJECT_NAME}-veritable:5002" "ws://${COMPOSE_PROJECT_NAME}-veritable:5003" --ipfs-origin http://ipfs:5001 --opa-origin http://opa:8181 --webhook-url "${PORTAL_BASE_URL}/api/webhooks" --auto-accept-connections true --auto-accept-credentials always --config /config.json --postgres-port ${VERITABLE_PG_PORT} --postgres-host ${VERITABLE_PG_HOST}
networks: ['nice-net', 'agent-net']
fetch-ai-adapter:
container_name: ${COMPOSE_PROJECT_NAME}-nice-fetch-ai-adapter
image: digicatapult/nice-fetch-ai-adapter:${NICE_FETCH_AI_ADAPTER-latest}
restart: on-failure
ports:
- '${NICE_FETCH_AI_ADAPTER_PORT_HOST-8000}:8000'
environment:
- AFJ_REST_LOG_LEVEL=1
networks: ['nice-net', 'agent-net']
ipfs:
container_name: ${COMPOSE_PROJECT_NAME}-ipfs
image: ipfs/kubo:${KUBO_AGENT_VER-release}
restart: on-failure
# ports:
# - "4001:4001" # ipfs swarm - expose if needed/wanted
# - "5001:5001" # ipfs api - expose if needed/wanted
# - '8080:8080' # ipfs gateway - expose if needed/wanted
volumes:
- ipfs-data:/data/ipfs
- ./ipfs-init.sh:/container-init.d/0-ipfs-init.sh
healthcheck:
interval: 5s
timeout: 5s
retries: 20
start_period: 0s
networks: ['nice-net', 'agent-net']
#environment:
# - IPFS_LOGGING=info
opa:
container_name: ${COMPOSE_PROJECT_NAME}-opa
image: openpolicyagent/opa:0.65.0-static
restart: on-failure
#ports:
# - '8181:8181'
command: run --server --log-level debug
networks: ['agent-net']
postgres:
container_name: ${COMPOSE_PROJECT_NAME}-postgres
image: postgres:16.3-alpine
restart: on-failure
ports:
- ${DB_PORT_HOST}:5432
volumes:
- pg-data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=${DB_USERNAME}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
healthcheck:
test:
['CMD-SHELL', 'PGUSER=${DB_USERNAME}', pg_isready", '-d', '${DB_NAME}']
interval: 5s
timeout: 5s
retries: 20
start_period: 0s
networks: ['agent-net']
postgres-veritable:
image: postgres:16.3-alpine
restart: on-failure
volumes:
- veritable-postgres:/var/lib/postgresql/data
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
healthcheck:
test: ['CMD-SHELL', 'PGUSER=postgres', 'pg_isready']
interval: 5s
timeout: 5s
retries: 20
start_period: 0s
networks:
- agent-net
chainvine:
container_name: ${COMPOSE_PROJECT_NAME}-chainvine
image: slafazan/chainvine-expanse:latest
restart: on-failure
ports:
- '${CHAINVINE_PORT-3145}:3145'
networks: ['agent-net']
volumes:
pg-data:
ipfs-data:
ipfs-cluster-data:
veritable-filesystem:
veritable-postgres:
networks:
nice-net:
name: nice-net
agent-net: