-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathdocker-compose.yml
97 lines (91 loc) · 2.89 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
version: "3.9"
services:
hardhat-node:
build:
context: .
dockerfile: docker/hardhat.Dockerfile
restart: always
ports:
- 8545:8545
volumes:
- ./packages/hardhat:/src/packages/hardhat
- /src/node_modules
- /src/packages/hardhat/node_modules
command: sh -c "rm -f /src/packages/hardhat/deployments/docker.json && npm run start:hardhat:node -w @ethernauts/hardhat"
hardhat-deploy:
build:
context: .
dockerfile: docker/hardhat.Dockerfile
volumes:
- ./packages/hardhat:/src/packages/hardhat
- /src/node_modules
- /src/packages/hardhat/node_modules
command: sh -c "/wait && npm run -w @ethernauts/hardhat start:hardhat:compile && npm run -w @ethernauts/hardhat start:hardhat:deploy -- --no-confirm --no-verify --clear --network docker"
environment:
WAIT_HOSTS: hardhat-node:8545
depends_on:
- hardhat-node
redis:
image: redis:6.2-alpine
command: redis-server --appendonly yes
volumes:
- ./docker/data/redis:/data
ports:
- 6379:6379
keeper-queue:
build:
context: .
dockerfile: docker/keeper.Dockerfile
restart: always
command: sh -c "npx --yes wait-on -l ./packages/hardhat/deployments/docker.json && npm run -w @ethernauts/keeper queue -- --network docker"
environment:
NODE_ENV: development
REDIS_HOST: redis
REDIS_PORT: 6379
volumes:
- ./packages/hardhat:/src/packages/hardhat
- ./packages/keeper:/src/packages/keeper
- /src/node_modules
- /src/packages/keeper/node_modules
- /src/packages/hardhat/node_modules
depends_on:
- redis
- hardhat-node
keeper-worker:
build:
context: .
dockerfile: docker/keeper.Dockerfile
restart: always
command: sh -c "npx --yes wait-on -l ./packages/hardhat/deployments/docker.json && npm run -w @ethernauts/keeper worker -- --network docker"
environment:
NODE_ENV: development
REDIS_HOST: redis
REDIS_PORT: 6379
volumes:
- ./packages/hardhat:/src/packages/hardhat
- ./packages/keeper:/src/packages/keeper
- /src/node_modules
- /src/packages/keeper/node_modules
- /src/packages/hardhat/node_modules
depends_on:
- hardhat-node
dapp:
build:
context: .
dockerfile: docker/dapp.Dockerfile
restart: always
environment:
NEXT_TELEMETRY_DISABLED: 1
volumes:
- ./packages/dapp:/src/packages/dapp
- ./packages/hardhat/artifacts:/src/packages/hardhat/artifacts
- ./packages/hardhat/deployments:/src/packages/hardhat/deployments
- /src/node_modules
- /src/packages/dapp/node_modules
- /src/packages/dapp/.next
- /src/packages/hardhat/node_modules
ports:
- 3000:3000
command: sh -c "npx --yes wait-on -l ./packages/hardhat/deployments/docker.json && npm run start:dapp"
depends_on:
- hardhat-node