-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
180 lines (166 loc) · 4.88 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
services:
postgres:
image: postgres:15
container_name: postgres
environment:
POSTGRES_USER: cred-service
POSTGRES_PASSWORD: cred-service-1
POSTGRES_DB: credential-service
volumes:
- postgres_data:/var/lib/postgresql/data
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5432:5432"
networks:
- cred-net
healthcheck:
test: ["CMD", "pg_isready", "-U", "cred-service", "-d", "credential-service"]
interval: 10s
timeout: 5s
retries: 5
did-service:
build:
context: ./did-service
depends_on:
postgres:
condition: service_healthy
container_name: did-service
environment:
DATABASE_URL: postgres://cred-service:cred-service-1@postgres:5432/credential-service
PORT: 8080
VAULT_ADDR: http://vault:8200
VAULT_TOKEN: root
ports:
- "8080:8080"
networks:
- cred-net
issuer-service:
build:
context: ./issuer-service
container_name: issuer-service
ports:
- "8082:8080"
environment:
- DATABASE_URL=postgres://cred-service:cred-service-1@postgres:5432/credential-service
- VAULT_ADDR=http://vault:8200
- VAULT_TOKEN=root
- RABBITMQ_HOST=rabbitmq
- RABBITMQ_PORT=5672
- RABBITMQ_USER=guest
- RABBITMQ_PASS=guest
networks:
- cred-net
depends_on:
rabbitmq:
condition: service_healthy
presentation-service:
build:
context: ./presentation-service
container_name: presentation-service
ports:
- "8083:8080"
environment:
DATABASE_URL: postgres://cred-service:cred-service-1@postgres:5432/credential-service
PORT: 8080
networks:
- cred-net
holder-service:
build:
context: ./holder-service
container_name: holder-service
environment:
- VAULT_ADDR=http://vault:8200
- VAULT_TOKEN=root
ports:
- "8085:8080"
networks:
- cred-net
verifier-service:
build:
context: ./verifier-service
container_name: verifier-service
ports:
- "8086:8080"
networks:
- cred-net
resolver-service:
build:
context: ./resolver-service
dockerfile: Dockerfile
container_name: resolver-service
ports:
- "8087:8080"
networks:
- cred-net
environment:
- DATABASE_URL=postgres://cred-service:cred-service-1@postgres:5432/credential-service
schema-service:
#image: schema-service:latest # You can change this to the built image tag or use 'build' if you are building locally
build:
context: ./schema-service # Path to your schema-service source code
dockerfile: Dockerfile # Optional, defaults to Dockerfile
container_name: schema-service
ports:
- "8088:8080" # Expose port 8086 for external access
environment:
- DATABASE_URL=postgres://cred-service:cred-service-1@postgres:5432/credential-service
networks:
- cred-net # Ensure it is part of the same network as other services
anchor-service:
build:
context: ./anchor-service
dockerfile: Dockerfile # Assuming your Dockerfile is in the root directory
container_name: anchor-service
ports:
- "8089:8080" # Expose the port 8080 externally
environment:
- GIN_MODE=release # Set any additional environment variables if necessary
- FABRIC_CFG_PATH=/etc/hyperledger/fabric/config.yaml
- HYPERLEDGER_PEER_ADDRESS=peer0.org1.example.com:7051
- HYPERLEDGER_LOCAL_MSP_ID=Org1MSP
- HYPERLEDGER_MSP_CONFIG_PATH=/etc/hyperledger/fabric/msp
- HYPERLEDGER_ORDERER_ADDRESS=orderer.example.com:7050
- HYPERLEDGER_ORDERER_LOCAL_MSP_ID=OrdererMSP
- HYPERLEDGER_ORDERER_MSP_CONFIG_PATH=/etc/hyperledger/fabric/msp
- HYPERLEDGER_CHANNEL_NAME=mychannel
- FABRIC_CHAINCODE_ID=basic
volumes:
- ./config:/etc/hyperledger/fabric
networks:
- cred-net # Ensure it is on the same network as other microservices
# Add HashiCorp Vault service
vault:
image: vault:1.13.1
container_name: vault
environment:
VAULT_DEV_ROOT_TOKEN_ID: root # Development-only token
VAULT_ADDR: http://127.0.0.1:8200
ports:
- "8200:8200"
cap_add:
- IPC_LOCK
networks:
- cred-net
volumes:
- ./vault:/vault/file # Optional, for persisting Vault data in development
command: server -dev # Dev mode for testing, use production settings later
depends_on:
- postgres
rabbitmq:
image: "rabbitmq:3-management"
container_name: rabbitmq
ports:
- "5672:5672" # RabbitMQ default port
- "15672:15672" # RabbitMQ management dashboard
networks:
- cred-net
healthcheck:
test: ["CMD", "rabbitmqctl", "status"]
interval: 10s
timeout: 5s
retries: 5
networks:
cred-net:
volumes:
postgres_data: