-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
179 lines (177 loc) · 3.81 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
version: '3'
networks:
network:
services:
postgres:
image: postgres:14.0-alpine
restart: always
volumes:
- ./data:/var/lib/postgresql/data
networks:
- network
ports:
- 5432:5432
restart: always
volumes:
- ./data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_PORT=5432
- POSTGRES_DB=${POSTGRES_DB}
ports:
- 5432:5432
postgres-user:
image: postgres:14.0-alpine
restart: always
volumes:
- ./data-user:/var/lib/postgresql/data
networks:
- network
restart: always
volumes:
- ./data-user:/var/lib/postgresql/data
environment:
- POSTGRES_USER=${USER_POSTGRES_USER}
- POSTGRES_PASSWORD=${USER_POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
ports:
- 5433:5432
graphql:
build:
context: .
target: graphql
restart: always
depends_on:
- postgres
- user-service
networks:
- network
ports:
- 8000:8000
environment:
- ROCKET_ADDRESS=0.0.0.0
- DATABASE_CRYPTO_URL=${DATABASE_URL}
- DATABASE_USERS_URL=${USER_DATABASE_URL}
- USER_SERVICE_URL=http://user-service:8001
chainlink-collector:
build:
context: .
target: chainlink-collector
restart: always
depends_on:
- postgres
networks:
- network
environment:
- NODE_URL=https://eth-rpc.gateway.pokt.network/
- DATABASE_URL=${DATABASE_URL}
coingecko-collector:
build:
context: .
target: coingecko-collector
restart: always
depends_on:
- postgres
networks:
- network
environment:
- DATABASE_URL=${DATABASE_URL}
cryptocompare-collector:
build:
context: .
target: cryptocompare-collector
restart: always
depends_on:
- postgres
networks:
- network
environment:
- DATABASE_URL=${DATABASE_URL}
gateio-collector:
build:
context: .
target: gateio-collector
restart: always
depends_on:
- postgres
networks:
- network
environment:
- DATABASE_URL=${DATABASE_URL}
aggregator:
build:
context: .
target: aggregator
restart: always
depends_on:
- postgres
networks:
- network
environment:
- CURRENCY=USD
- DATABASE_URL=${DATABASE_URL}
user-service:
build:
context: .
target: user-service
restart: always
depends_on:
- postgres-user
networks:
- network
environment:
- PORT=8001
- DATABASE_URL=${USER_DATABASE_URL}
- KEY=${KEY}
notification-service:
build:
context: .
target: notification-service
restart: always
depends_on:
- postgres
- postgres-user
- telegram-notification
networks:
- network
environment:
- CRYPTO_DATABASE_URL=${DATABASE_URL}
- USER_DATABASE_URL=${USER_DATABASE_URL}
- BRELLO_API_KEY=${BRELLO_API_KEY}
- TELEGRAM_NOTIFICATION_URL=http://telegram-notification:8002
telegram-notification:
build:
context: .
target: telegram-notification
restart: always
depends_on:
- postgres-user
networks:
- network
environment:
- PORT=8002
- TELOXIDE_TOKEN=${TELOXIDE_TOKEN}
- DATABASE_URL=${USER_DATABASE_URL}
frontend:
restart: always
build:
context: ./frontend
target: frontend
depends_on:
- graphql
networks:
- network
ports:
- 3000:3000
nginx:
image: nginx:latest
ports:
- 80:80
- 443:443
networks:
- network
volumes:
- ./nginx/reverse_proxy.conf:/etc/nginx/conf.d/default.conf
- ./nginx/cert/cert.pem:/etc/ssl/cert.pem
- ./nginx/cert/key.pem:/etc/ssl/key.pem