-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
61 lines (54 loc) · 2.2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
61 lines (54 loc) · 2.2 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
services:
aproxy:
build: .
container_name: aproxy
restart: unless-stopped
ports:
- "8888:8080"
volumes:
# Persistent data directory for database and logs
- aproxy-data:/app/data
environment:
# Server configuration
- APROXY_SERVER_LISTEN_ADDR=${APROXY_SERVER_LISTEN_ADDR:-:8080}
- APROXY_SERVER_READ_TIMEOUT=${APROXY_SERVER_READ_TIMEOUT:-30s}
- APROXY_SERVER_WRITE_TIMEOUT=${APROXY_SERVER_WRITE_TIMEOUT:-30s}
- APROXY_SERVER_IDLE_TIMEOUT=${APROXY_SERVER_IDLE_TIMEOUT:-60s}
- APROXY_SERVER_MAX_CONNECTIONS=${APROXY_SERVER_MAX_CONNECTIONS:-1000}
- APROXY_SERVER_ENABLE_HTTPS=${APROXY_SERVER_ENABLE_HTTPS:-true}
- APROXY_SERVER_MAX_RETRIES=${APROXY_SERVER_MAX_RETRIES:-3}
- APROXY_SERVER_AUTH_TOKEN=${APROXY_SERVER_AUTH_TOKEN:-}
# Database configuration (uses data volume)
- APROXY_DATABASE_PATH=${APROXY_DATABASE_PATH:-/app/data/aproxy.db}
- APROXY_DATABASE_MAX_AGE=${APROXY_DATABASE_MAX_AGE:-24h}
- APROXY_DATABASE_CLEANUP_INTERVAL=${APROXY_DATABASE_CLEANUP_INTERVAL:-1h}
# Proxy management
- APROXY_PROXY_UPDATE_INTERVAL=${APROXY_PROXY_UPDATE_INTERVAL:-15m}
- APROXY_PROXY_MAX_FAILURES=${APROXY_PROXY_MAX_FAILURES:-3}
- APROXY_PROXY_RECHECK_TIME=${APROXY_PROXY_RECHECK_TIME:-5m}
# Checker configuration
- APROXY_CHECKER_TEST_URL=${APROXY_CHECKER_TEST_URL:-http://icanhazip.com}
- APROXY_CHECKER_TIMEOUT=${APROXY_CHECKER_TIMEOUT:-15s}
- APROXY_CHECKER_MAX_WORKERS=${APROXY_CHECKER_MAX_WORKERS:-50}
- APROXY_CHECKER_CHECK_INTERVAL=${APROXY_CHECKER_CHECK_INTERVAL:-10m}
# Scraper configuration
- APROXY_SCRAPER_TIMEOUT=${APROXY_SCRAPER_TIMEOUT:-30s}
- APROXY_SCRAPER_SOURCES=${APROXY_SCRAPER_SOURCES:-proxyscrape,freeproxylist,geonode}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# Resource limits
deploy:
resources:
limits:
memory: 512M
cpus: '1.0'
reservations:
memory: 128M
cpus: '0.25'
volumes:
aproxy-data:
driver: local