-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
95 lines (95 loc) · 2.16 KB
/
docker-compose.yml
File metadata and controls
95 lines (95 loc) · 2.16 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
version: '3.8'
services:
ipfs:
image: ipfs/kubo:v0.26.0 # Pin to specific version
restart: unless-stopped
environment:
- IPFS_PATH=/data/ipfs
ports:
- "4001:4001"
- "8080:8080"
- "127.0.0.1:5001:5001"
command: ["daemon", "--migrate=true", "--agent-version-suffix=docker", "--enable-gc"]
volumes:
- ipfs:/data/ipfs
networks:
- trole_network
container_name: ipfs
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/ipfs/QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 512M
poa:
image: disregardfiat/poa:0.0.2
restart: unless-stopped
command: ["./main", "-node", "2", "-username", "${ACCOUNT}", "-WS_PORT=8002", "-useWS=true", "-honeycomb=true", "-IPFS_PORT=5001", "-validators", "https://spktest.dlux.io/services/VAL"]
ports:
- "8002-8003:8000-8001"
networks:
- trole_network
container_name: poa
depends_on:
ipfs:
condition: service_healthy
deploy:
resources:
limits:
memory: 1G
reservations:
memory: 256M
api:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
environment:
- PORT=5050
- ENDPOINT=ipfs
- ENDPORT=5001
- DOCKER=true
ports:
- "5050:5050"
volumes:
- ./.env:/.env:ro # Read-only mount
- db:/app/db/
networks:
- trole_network
depends_on:
ipfs:
condition: service_healthy
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 128M
healthcheck:
test: ["CMD", "node", "healthcheck.js"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
volumes:
ipfs:
driver: local
db:
driver: local
networks:
trole_network:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16