-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompose.yml
91 lines (83 loc) · 2.24 KB
/
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
version: "3.8"
services:
chordNode:
build:
context: ./build/p2p_node/
dockerfile: Dockerfile
image: chord_node:v1.0
networks:
- chord
deploy:
replicas: "${NODE_REPLICAS}"
resources:
limits:
cpus: '0.5'
memory: 100m
entrypoint: #["watchexec","-f","chordNode.py","-c","-r", "--","python3","./chordNode.py"]
- /bin/bash
- -c
- |
watchexec -f chordNode.py -c -r -- python3 ./chordNode.py
environment:
- FT_SIZE=${IDENT_SPACE_EXP}
tty: true
volumes:
- ChordNodeData:/opt/chordNode/Data/
- ChordNodeCode:/opt/chordNode/
- ProtoStubs:/opt/chordNode/generatedStubs/
initNode:
build:
context: ./build/init_node/
dockerfile: Dockerfile
depends_on:
- chordNode
image: init_node:v1.4
container_name: init_node
networks:
chord:
tty: true
entrypoint:
- /bin/bash
- -c
- |
python3 initialization.py
environment:
- DATA_PRESENT=${DB_PRESENT}
- CNAME=init_node
- NET_NAME=${NNAME}
- EXPONENT=${IDENT_SPACE_EXP}
volumes:
- InitNodeCode:/opt/chord/
- /var/run/docker.sock:/var/run/docker.sock
- ProtoStubs:/opt/chord/generatedStubs/
networks:
chord:
name: chord-net
external: true
volumes:
ChordNodeData:
external: true
InitNodeCode:
external: true
ChordNodeCode:
external: true
ProtoStubs:
external: true
# DooD:
# name: DockerOutOfDocker
# driver: local
# driver_opts:
# o: bind
# type: none
# device: /var/run/docker.sock
# name: ChordNodeCode
# driver: local
# driver_opts:
# o: bind
# type: none
# device: /home/up1072498/Projects/Chord/init_node/ChordNodeCode
# while true; do
# echo "Init node is alive: $(date +"%T")"
# sleep 100
# done"
# /bin/bash -c "python3 ./initilization.py