-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose-dev.yml
68 lines (68 loc) · 1.67 KB
/
docker-compose-dev.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
version: '3'
volumes:
mongoVolume:
services:
mongo:
image: mongo:4
container_name: mongo-dev
volumes:
- mongoVolume:/data/db
ports:
# map to host port to access using mongo cli.
- "27017:27017"
server:
image: node:12
container_name: server-dev
volumes:
- ./server/:/home/node/app
# Mount symbolic link as a volume
- ./client/src/contracts:/home/node/app/indexer/contracts
working_dir: /home/node/app
depends_on:
- mongo
- ganache
environment:
- MONGO_URL=mongodb://mongo/
- PORT=3000
- NODE_ENV=development
- DOCKER=yes
env_file:
- .env
ports:
- "3000:3000"
command: bash -c "npm run devserver"
client:
image: node:12
container_name: client-dev
volumes:
- ./client/:/home/node/app
working_dir: /home/node/app
depends_on:
- server
environment:
- PORT=3001
ports:
- "3001:3001"
# Use npx concurrently to avoid create-react-app from clearing the console.
command: bash -c "npx concurrently npm:start"
ganache:
image: trufflesuite/ganache-cli
container_name: ganache-dev
volumes:
- ./ganache:/home/ganache
env_file:
- .env
ports:
- "8545:8545"
command: --mnemonic "${MNEMONIC}" --db /home/ganache/ --networkId 5777 --quiet
relay:
image: node:12
container_name: relay-dev
working_dir: /home/node/app
depends_on:
- ganache
environment:
- NODE_ENV=development
ports:
- "8090:8090"
command: bash -c "npm install @openzeppelin/gsn-helpers && npx oz-gsn run-relayer --quiet --ethereumNodeURL http://ganache:8545"