-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
134 lines (126 loc) · 3.25 KB
/
docker-compose.yml
File metadata and controls
134 lines (126 loc) · 3.25 KB
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
version: "3.8"
services:
api-gateway:
build:
context: .
dockerfile: ./docker/api-gateway.Dockerfile
ports:
- "8000:8000"
environment:
- PORT=8000
- NODE_ENV=development
- AUTH_SERVICE_URL=http://auth-service:8001
- QUANTUM_SERVICE_URL=http://quantum-service:8002
- LOTTERY_SERVICE_URL=http://lottery-service:8003
- BLOCKCHAIN_SERVICE_URL=http://blockchain-service:8004
depends_on:
- quantum-service
- lottery-service
- blockchain-service
- auth-service
networks:
- qupot-network
volumes:
- ./apps/api-gateway:/app/apps/api-gateway
- ./packages:/app/packages
- node_modules_api_gateway:/app/apps/api-gateway/node_modules
quantum-service:
build:
context: .
dockerfile: ./docker/quantum-service.Dockerfile
ports:
- "8002:8002"
environment:
- PORT=8002
- ENVIRONMENT=development
networks:
- qupot-network
volumes:
- ./apps/quantum-service:/app/apps/quantum-service
lottery-service:
build:
context: .
dockerfile: ./docker/lottery-service.Dockerfile
ports:
- "8003:8003"
environment:
- PORT=8003
- NODE_ENV=development
- DB_HOST=postgres
- DB_PORT=5432
- DB_USERNAME=postgres
- DB_PASSWORD=postgres
- DB_NAME=lottery
depends_on:
- postgres
networks:
- qupot-network
volumes:
- ./apps/lottery-service:/app/apps/lottery-service
- ./packages:/app/packages
- node_modules_lottery_service:/app/apps/lottery-service/node_modules
blockchain-service:
build:
context: .
dockerfile: ./docker/blockchain-service.Dockerfile
ports:
- "8004:8004"
environment:
- PORT=8004
- NODE_ENV=development
- HARDHAT_NETWORK=hardhat
networks:
- qupot-network
volumes:
- ./apps/blockchain-service:/app/apps/blockchain-service
- ./packages:/app/packages
- node_modules_blockchain_service:/app/apps/blockchain-service/node_modules
auth-service:
build:
context: .
dockerfile: ./docker/auth-service.Dockerfile
ports:
- "8001:8001"
environment:
- PORT=8001
- NODE_ENV=development
- DB_HOST=postgres
- DB_PORT=5432
- DB_USERNAME=postgres
- DB_PASSWORD=postgres
- DB_NAME=auth_service
depends_on:
- postgres
networks:
- qupot-network
volumes:
- ./apps/auth-service:/app/apps/auth-service
- ./packages:/app/packages
- node_modules_auth_service:/app/apps/auth-service/node_modules
postgres:
image: postgres:14
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_MULTIPLE_DATABASES=lottery,auth_service
volumes:
- postgres_data:/var/lib/postgresql/data
- ./docker/postgres:/docker-entrypoint-initdb.d
networks:
- qupot-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
networks:
qupot-network:
driver: bridge
volumes:
postgres_data:
node_modules_api_gateway:
node_modules_lottery_service:
node_modules_blockchain_service:
node_modules_auth_service: