-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (73 loc) · 1.89 KB
/
docker-compose.yml
File metadata and controls
76 lines (73 loc) · 1.89 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
version: '3.8'
services:
upwork-poller:
build: .
container_name: upwork-job-poller
environment:
- UPWORK_SEARCH_QUERY=AI agent Developer
- FREELANCER_PROFILE_PATH=/app/files/profile.md
- POLLING_INTERVAL=480
- MAX_JOBS_PER_POLL=10
- JOB_RETENTION_DAYS=30
- HIGH_VALUE_THRESHOLD=7.0
- WEBHOOK_URL=https://n8n.fy.studio/webhook-test/a9a844f3-d651-4413-8bf3-820c6877b153
- GOOGLE_API_KEY=${GOOGLE_API_KEY}
ports:
- "8000:8000" # Health check endpoint
- "8001:8001" # Prometheus metrics endpoint
volumes:
# Mount profile file
- ./files/profile.md:/app/files/profile.md:ro
# Mount directories for persistent data
- job-tracking:/app/files/job_tracking
- cache:/app/files/cache
- auth:/app/files/auth
- logs:/app/logs
restart: unless-stopped
deploy:
resources:
limits:
cpus: '1'
memory: 1G
reservations:
cpus: '0.5'
memory: 512M
healthcheck:
test:
- "CMD"
- "/bin/sh"
- "-c"
- |
curl -f http://localhost:8000/health || exit 1;
curl -f http://localhost:8001/metrics || exit 1;
ps aux | grep "[p]ython.*continuous_poller" || exit 1
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
tag: "{{.Name}}"
labels: "production,upwork-poller"
networks:
- upwork-network
labels:
- "com.docker.compose.project=upwork-poller"
- "com.docker.compose.service=poller"
- "monitoring=true"
networks:
upwork-network:
name: upwork-network
driver: bridge
volumes:
job-tracking:
name: upwork-job-tracking
cache:
name: upwork-cache
auth:
name: upwork-auth
logs:
name: upwork-logs