-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
51 lines (48 loc) · 1.1 KB
/
docker-compose.yaml
File metadata and controls
51 lines (48 loc) · 1.1 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
services:
app:
build:
context: .
restart: always
env_file:
- .env.validator.local
environment:
POSTGRES_HOST: postgres
volumes:
- ${HOME}/.bittensor:/root/.bittensor
depends_on:
migrations:
condition: service_completed_successfully
postgres:
condition: service_healthy
migrations:
build:
context: .
dockerfile: Dockerfile.migrations
env_file:
- .env.validator.local
environment:
POSTGRES_HOST: postgres
depends_on:
postgres:
condition: service_healthy
postgres:
container_name: postgres
image: postgres:15.8
restart: always
env_file:
- .env.validator.local
ports:
- "5432:5432"
volumes:
- postgres-validator-volume:/var/lib/postgresql/data
command: >
postgres
-c statement_timeout=300000
-c idle_in_transaction_session_timeout=600000
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 5s
timeout: 5s
retries: 5
volumes:
postgres-validator-volume: