-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
93 lines (88 loc) · 2.19 KB
/
docker-compose.yml
File metadata and controls
93 lines (88 loc) · 2.19 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
services:
redis:
image: redis:7-alpine
container_name: hldf-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
postgres:
image: postgres:16-alpine
container_name: hldf-postgres
environment:
POSTGRES_USER: hyperliquid
POSTGRES_PASSWORD: hyperliquid
POSTGRES_DB: hyperliquid
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U hyperliquid"]
interval: 10s
timeout: 5s
retries: 5
rust-fetcher:
build:
context: ./rust-fetcher
dockerfile: Dockerfile
container_name: hldf-rust-fetcher
ports:
- "3000:3000"
- "9091:9091"
environment:
CONFIG_PATH: /app/config/rust-fetcher.toml
volumes:
- ./config/rust-fetcher.docker.toml:/app/config/rust-fetcher.toml:ro
depends_on:
redis:
condition: service_healthy
restart: unless-stopped
python-api:
build:
context: ./python-api
dockerfile: Dockerfile
container_name: hldf-python-api
ports:
- "8000:8000"
environment:
DATABASE_URL: postgresql+asyncpg://hyperliquid:hyperliquid@postgres:5432/hyperliquid
REDIS_URL: redis://redis:6379
RUST_API_URL: http://rust-fetcher:3000/api/v1/allmids
JWT_SECRET_KEY: wifojehohohihihsohiweh2837t28gdiuwd
JWT_ALGORITHM: HS256
JWT_ACCESS_TOKEN_EXPIRE_HOURS: "24"
API_HOST: "0.0.0.0"
API_PORT: "8000"
WORKERS: "1"
DEBUG: "false"
REDIS_KEY_PREFIX: price
RATE_LIMIT_ENABLED: "true"
RATE_LIMIT_REQUESTS_PER_MINUTE: "60"
RATE_LIMIT_BURST: "10"
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
restart: unless-stopped
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: hldf-frontend
ports:
- "5173:80"
depends_on:
- python-api
restart: unless-stopped
volumes:
redis_data:
postgres_data: