-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-dev.yml
67 lines (59 loc) · 1.57 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
services:
blockchain:
image: trufflesuite/ganache-cli:latest
command: -d
--db /app
-i eleos
--accounts 20
--deterministic
--mnemonic="grit portion captain traffic same bacon donate captain brown success impulse security"
ports:
- 8545:8545
logging:
driver: none
database:
image: mongo:latest
environment:
MONGO_INITDB_ROOT_USERNAME: test
MONGO_INITDB_ROOT_PASSWORD: test
ports:
- 27017:27017
logging:
driver: none
run-some-commands-on-host-blockchain:
image: ubuntu:latest
depends_on:
- blockchain
- database
network_mode: host
user: root
volumes:
- /:/host
entrypoint: ["chroot", "/host", "/bin/bash", "-c"]
command:
- |
cd $PWD/blockchain && su $USER -c 'npm install && npm run build && npm run migrate'
cd $PWD/backend && npm install && node campaignListener/listener.js
run-some-commands-on-host-backend:
image: ubuntu:latest
depends_on:
- run-some-commands-on-host-blockchain
user: root
volumes:
- /:/host
network_mode: host
entrypoint: ["chroot", "/host", "/bin/bash","-c"]
command:
- cd $PWD/backend && npm install && node index.js
run-some-commands-on-host-frontend:
image: ubuntu:latest
depends_on:
- run-some-commands-on-host-backend
network_mode: host
user: root
volumes:
- /:/host
entrypoint: ["chroot", "/host", "/bin/bash","-c"]
command:
- |
cd $PWD/frontend && npm install && npm run build && npm start