-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
175 lines (164 loc) · 4.81 KB
/
compose.yaml
File metadata and controls
175 lines (164 loc) · 4.81 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
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
services:
mongo:
image: mongo:7
container_name: mongo
restart: unless-stopped
#ports:
#- 27017:27017 # no binding needed, only docker access
environment:
MONGO_INITDB_ROOT_USERNAME: root # admin username
MONGO_INITDB_ROOT_PASSWORD: password # admin password
volumes:
- /influencedata/mongodb-data/db:/data/db # persist MongoDB data
- /influencedata/mongodb-data/config:/data/config # persist MongoDB configuration
mongo-express: # Web-based UI
image: mongo-express:1.0.0
container_name: mongo-express
restart: no
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_URL: mongodb://root:password@mongo:27017/ # values as configured on the mongo service above
ME_CONFIG_BASICAUTH_ENABLED: true
ME_CONFIG_BASICAUTH_USERNAME: user
ME_CONFIG_BASICAUTH_PASSWORD: userpass
depends_on:
- mongo
profiles:
- tools
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.9.0
container_name: elasticsearch
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- ES_JAVA_OPTS=-Xms512m -Xmx512m
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- /influencedata/elasticsearch-data/:/usr/share/elasticsearch/data
#ports:
#- 9200:9200 # no binding needed, only docker access
#- 9300:9300 # not needed, cluster port
redis:
image: redis:7.2-alpine
container_name: redis
command: ["redis-server", "--appendonly", "yes"]
#ports:
#- 6379:6379 # no binding needed, only docker access
volumes:
- /influencedata/redis-data:/data
influence-client:
build: ./influence-client # build the app
container_name: influence-client
restart: unless-stopped
ports:
- 3000:3000 # main client port
env_file:
- ./influence-client/.env
volumes:
- ./influence-client:/app # mount the project inside container for live edits
- /app/node_modules # be wary of container dependencies
command: ["npm", "start"] # dev start
influence-server:
build: # build the app
context: ./influence-server
target: runtime
image: influence-server # store the built app as an image to be reused
container_name: influence-server
restart: unless-stopped
ports:
- 3001:3001 # API server
env_file:
- ./influence-server/.env
depends_on:
- mongo
- elasticsearch
- redis
volumes:
- ./influence-server:/app
- /app/node_modules
command: ["npm", "run", "watch"]
influence-indexer:
image: influence-server # reuse pre-built image
container_name: influence-indexer
restart: unless-stopped
env_file:
- ./influence-server/.env
depends_on:
- mongo
- elasticsearch
- redis
command: ["npm", "run", "elasticIndexer"] # run in indexer mode
profiles:
- indexer
influence-starkneteventretriever:
image: influence-server
container_name: influence-starkneteventretriever
restart: unless-stopped
env_file:
- ./influence-server/.env
depends_on:
- mongo
- elasticsearch
- redis
command: ["npm", "run", "starknetEventRetriever"]
profiles:
- indexer
influence-eventprocessor:
image: influence-server
container_name: influence-eventprocessor
restart: unless-stopped
env_file:
- ./influence-server/.env
depends_on:
- mongo
- elasticsearch
- redis
command: ["npm", "run", "eventProcessor"]
profiles:
- indexer
influence-tools:
image: influence-server # reuse pre-built image from previous step
restart: no
env_file:
- ./influence-server/.env
depends_on:
- mongo
- elasticsearch
- redis
entrypoint: ["node"]
profiles:
- tools
influence-test: # unit testing
build: # build the specific unit-testing image
context: ./influence-server
target: test
container_name: influence-test
restart: no
# no env file, no dependencies
volumes:
- ./influence-server:/app
- /app/node_modules
command: ["npm", "test"]
profiles:
- tools
juno:
image: nethermind/juno:latest
container_name: juno
restart: unless-stopped
ports:
- 6060:6060
volumes:
- /influencedata/starknet-juno-data:/var/lib/juno
command: >
--db-path /var/lib/juno
--network sepolia
--eth-node wss://sepolia.infura.io/ws/v3/<apikey>
--http
--http-host 0.0.0.0
--http-port "6060"
profiles:
- starknet