-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (67 loc) · 1.51 KB
/
docker-compose.yml
File metadata and controls
72 lines (67 loc) · 1.51 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
version: "3.8"
services:
# Backend API Service
backend:
build:
context: ./token-metrics-service
dockerfile: Dockerfile
container_name: token-metrics-backend
ports:
- "5000:5000"
environment:
- FLASK_ENV=production
- CMC_API_KEY=818acf4e-ce65-4d5e-8c2d-81135b5572e5
- CMC_BASE_URL=https://sandbox-api.coinmarketcap.com/v1
- SECRET_KEY=mosin-shaikh
volumes:
- backend_data:/app/src/database
restart: unless-stopped
healthcheck:
test:
[
"CMD",
"curl",
"-f",
"http://localhost:5000/api/v1/tokens?limit=1",
"-H",
"X-API-Key: demo-api-key-12345678",
]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- token-metrics-network
# Frontend Dashboard
frontend:
build:
context: ./token-metrics-dashboard
dockerfile: Dockerfile
container_name: token-metrics-frontend
ports:
- "80:80"
depends_on:
- backend
restart: unless-stopped
networks:
- token-metrics-network
# Redis for caching (optional)
redis:
image: redis:7-alpine
container_name: token-metrics-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
restart: unless-stopped
command: redis-server --appendonly yes
networks:
- token-metrics-network
volumes:
backend_data:
driver: local
redis_data:
driver: local
networks:
token-metrics-network:
driver: bridge