-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathdocker-compose.example.yml
More file actions
68 lines (63 loc) · 1.54 KB
/
Copy pathdocker-compose.example.yml
File metadata and controls
68 lines (63 loc) · 1.54 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
version: "3.4"
services:
yada-node:
image: ghcr.io/pdxwebdev/yadacoin:latest
volumes:
- .:/app
- /var/run/docker.sock:/var/run/docker.sock
- /etc/letsencrypt:/etc/letsencrypt:ro
ports:
- "8000:8000"
- "8001:8001"
- "3333:3333"
- "3334:3334"
depends_on:
- mongodb
environment:
- MONGODB_URI=mongodb://mongodb:27017/yadacoin
- PYTHONUNBUFFERED=0
- MOTOR_MAX_WORKERS=1
- PYTHONPATH=/etc/yadacoin
logging:
driver: json-file
options:
max-size: "200k"
max-file: "10"
deploy:
resources:
limits:
cpus: "0.40"
memswap_limit: 0
mongodb:
image: mongo:latest
ports:
- "127.0.0.1:27017:27017"
volumes:
- mongodb_data:/data/db
command: --wiredTigerCacheSizeGB .25
logging:
driver: json-file
options:
max-size: "200k"
max-file: "10"
deploy:
resources:
limits:
cpus: "0.40"
memswap_limit: 0
restore:
image: mongo:latest
command: sh -c 'mongorestore --drop --host mongodb /dump > /dev/null 2>&1'
depends_on:
- mongodb
volumes:
- /etc/yadacoin/dump:/mongodump
backup:
image: mongo:latest
depends_on:
- mongodb
volumes:
- /etc/yadacoin:/etc/yadacoin
command: sh -c 'mongodump --host mongodb --db=yadacoin --collection=blocks && tar -czvf /etc/yadacoin/bootstrap.tar.gz dump && mv /etc/yadacoin/bootstrap.tar.gz /etc/yadacoin/static/bootstrap.tar.gz'
volumes:
mongodb_data: