-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose_example.yml
48 lines (47 loc) · 1.56 KB
/
docker-compose_example.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
version: '3'
services:
mongodb:
image: mongo:latest
restart: always
network_mode: "host"
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: "<PASS_HERE>"
MONGO_INITDB_DATABASE: stark
volumes:
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
- ./mongodb:/data/db
- ./mongod.conf:/etc/mongod.conf
entrypoint: [ "mongod", "--config", "/etc/mongod.conf" ]
node:
build: .
container_name: node
restart: always
network_mode: "host"
environment:
- PORT=5000
- MONGODB_URL=mongodb://root:<PASS_HERE>@127.0.0.1:27017 # mongodb link
- GRAPHQL_URL=http://127.0.0.1:8081/v1/graphql # url for parse
- NEW_INSERT_CONTRACTS=true # insert new contracts using 30m timer
- CORES=10 # num of cores for cache workers
volumes:
- ./client:/node/client
- ./server:/node/server
- ./shared:/node/shared
parser:
build:
context: .
dockerfile: Dockerfile2
container_name: parser
restart: always
network_mode: "host"
environment:
- MONGODB_URL=mongodb://root:<PASS_HERE>>@127.0.0.1:27017 # mongodb link
- GRAPHQL_URL=http://127.0.0.1:8081/v1/graphql # url for parse
- SLOW_MODE=false # slow mode for parse new/all contracts
- PARSE_ALL_CONTRACTS=false # parse old contracts for db
- NEW_INSERT_CONTRACTS=true # insert new contracts using 30m timer
- UPDATE_CONTRACTS=false # update every 1 day all contracts for db
volumes:
- ./parser:/node/parser
- ./shared:/node/shared