-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
87 lines (83 loc) · 2.1 KB
/
docker-compose.yml
File metadata and controls
87 lines (83 loc) · 2.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
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
services:
# ================================
# Backend Service (FastAPI)
# ================================
backend:
build:
context: .
dockerfile: Dockerfile
target: backend
container_name: news-extractor-backend
ports:
- "8000:8000"
environment:
- PYTHONUNBUFFERED=1
volumes:
- ./data:/app/data # Persist extracted news data
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/')"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
networks:
- news-extractor-network
# ================================
# MCP Service (AI Agent Tools)
# ================================
mcp:
build:
context: .
dockerfile: Dockerfile
target: mcp
container_name: news-extractor-mcp
ports:
- "8765:8765"
environment:
- PYTHONUNBUFFERED=1
volumes:
- ./data:/app/data # Share data volume with backend
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8765/health')"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
networks:
- news-extractor-network
# ================================
# Frontend Service (Vue 3 + Nginx)
# ================================
frontend:
build:
context: .
dockerfile: Dockerfile
target: frontend
container_name: news-extractor-frontend
ports:
- "3021:80"
depends_on:
- backend
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/"]
interval: 30s
timeout: 3s
retries: 3
start_period: 5s
networks:
- news-extractor-network
# ================================
# Networks
# ================================
networks:
news-extractor-network:
driver: bridge
# ================================
# Volumes
# ================================
volumes:
data:
driver: local