-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
82 lines (76 loc) · 1.86 KB
/
docker-compose.yaml
File metadata and controls
82 lines (76 loc) · 1.86 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
networks:
daochild_mpc:
driver: bridge
# More security for keys: https://docs.docker.com/compose/how-tos/use-secrets/
#secrets:
# hardhat_secret:
# file: ./secrets/hardhat_api_key
# web_secret:
# file: ./secrets/web_api_key
# server_secret:
# file: ./secrets/server_api_key
services:
hardhat:
build:
context: ./sc
container_name: daochild_mpc_hardhat-node
networks:
- daochild_mpc
volumes:
- daochild_mpc_hardhat:/app
command: sh -c "npm install && npx hardhat node"
ports:
- "127.0.0.1:8545:8545" # Exposing Hardhat on its default port
restart: unless-stopped
security_opt:
- no-new-privileges:true
read_only: true
tmpfs:
- /tmp
web:
build:
context: ./web
container_name: daochild_mpc_web-app
networks:
- daochild_mpc
depends_on:
- hardhat
volumes:
- daochild_mpc_web:/app
command: sh -c "npm install && npm start"
ports:
- "127.0.0.1:3000:3000" # React app running on port 3000
environment:
REACT_APP_HARDHAT_URL: http://hardhat:8545 # Using the Hardhat service within the container network
restart: unless-stopped
security_opt:
- no-new-privileges:true
read_only: true
tmpfs:
- /tmp
server:
build:
context: ./server
container_name: daochild_mpc_node-app
networks:
- daochild_mpc
depends_on:
- hardhat
- web
volumes:
- daochild_mpc_server:/app
command: sh -c "npm install && node server.js"
ports:
- "127.0.0.1:5000:5000" # Node.js server on port 5000
environment:
HARDHAT_URL: http://hardhat:8545 # Connection to Hardhat service
restart: unless-stopped
security_opt:
- no-new-privileges:true
read_only: true
tmpfs:
- /tmp
volumes:
daochild_mpc_hardhat:
daochild_mpc_web:
daochild_mpc_server: