forked from backend-developers-ltd/ComputeHorde
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
115 lines (108 loc) · 2.93 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
version: '3.7'
services:
redis:
image: redis:6-alpine
command: redis-server --appendonly yes
healthcheck:
test: redis-cli ping
volumes:
- redis:/data
logging: &logging
driver: journald
options:
tag: '{{.Name}}'
db:
image: postgres:14.0-alpine
healthcheck:
test: pg_isready -U postgres || exit 1
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB:postgres
volumes:
- db:/var/lib/postgresql/data
logging:
<<: *logging
app:
image: backenddevelopersltd/compute-horde-miner:v0-latest
pull_policy: always
healthcheck:
test: wget -q --spider 127.0.0.1:8000/admin/login/ || exit 1
init: true
restart: unless-stopped
env_file: ./.env
environment:
- PROMETHEUS_MULTIPROC_DIR=/prometheus-multiproc-dir
- PYTHONPATH=/root/vendor
volumes:
- ${HOST_WALLET_DIR}:/root/.bittensor/wallets
- ${HOST_VENDOR_DIR:-/tmp}:/root/vendor
# mounting host docker socket to allow running executor images on host machine
- /var/run/docker.sock:/var/run/docker.sock
- static:/root/src/static
depends_on:
- redis
- db
logging:
<<: *logging
labels:
- "com.centurylinklabs.watchtower.enable=true"
celery-worker:
image: backenddevelopersltd/compute-horde-miner:v0-latest
pull_policy: always
init: true
healthcheck:
test: celery -A compute_horde_miner status > /dev/null || exit 1
restart: unless-stopped
env_file: ./.env
environment:
- CELERY_MASTER_CONCURRENCY=4
- CELERY_WORKER_CONCURRENCY=2
- PROMETHEUS_MULTIPROC_DIR=/prometheus-multiproc-dir
volumes:
- ${HOST_WALLET_DIR}:/root/.bittensor/wallets
command: ./celery-entrypoint.sh
tmpfs: /run
depends_on:
- redis
logging:
<<: *logging
labels:
- "com.centurylinklabs.watchtower.enable=true"
celery-beat:
image: backenddevelopersltd/compute-horde-miner:v0-latest
pull_policy: always
init: true
restart: unless-stopped
env_file: ./.env
environment:
- PROMETHEUS_MULTIPROC_DIR=/prometheus-multiproc-dir
volumes:
- ${HOST_WALLET_DIR}:/root/.bittensor/wallets
command: nice celery -A compute_horde_miner beat -l INFO --schedule /tmp/celerybeat-schedule -f /tmp/celery-beat.log
depends_on:
- redis
logging:
<<: *logging
labels:
- "com.centurylinklabs.watchtower.enable=true"
nginx:
image: backenddevelopersltd/compute-horde-miner-nginx:v0-latest
restart: unless-stopped
healthcheck:
test: wget -q --spider 0.0.0.0:80/admin/login/ || exit 1
env_file: ./.env
volumes:
- static:/srv/static:ro
depends_on:
- app
command: nginx -g 'daemon off;'
ports:
- ${BITTENSOR_MINER_PORT}:80
logging:
<<: *logging
labels:
- "com.centurylinklabs.watchtower.enable=true"
volumes:
redis:
db:
static: