2024-11-16 18:08:56 +08:00
|
|
|
services:
|
|
|
|
crawl4ai:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
args:
|
2024-11-24 19:35:53 +08:00
|
|
|
PYTHON_VERSION: "3.10"
|
|
|
|
INSTALL_TYPE: ${INSTALL_TYPE:-basic}
|
2024-11-16 18:08:56 +08:00
|
|
|
ENABLE_GPU: false
|
2024-11-18 21:00:06 +08:00
|
|
|
profiles: ["local"]
|
|
|
|
ports:
|
|
|
|
- "11235:11235"
|
|
|
|
- "8000:8000"
|
|
|
|
- "9222:9222"
|
|
|
|
- "8080:8080"
|
|
|
|
environment:
|
|
|
|
- CRAWL4AI_API_TOKEN=${CRAWL4AI_API_TOKEN:-}
|
|
|
|
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
|
|
|
|
- CLAUDE_API_KEY=${CLAUDE_API_KEY:-}
|
|
|
|
volumes:
|
|
|
|
- /dev/shm:/dev/shm
|
|
|
|
deploy:
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
memory: 4G
|
|
|
|
reservations:
|
|
|
|
memory: 1G
|
|
|
|
restart: unless-stopped
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "curl", "-f", "http://localhost:11235/health"]
|
|
|
|
interval: 30s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 3
|
|
|
|
start_period: 40s
|
|
|
|
|
|
|
|
crawl4ai-hub:
|
|
|
|
image: unclecode/crawl4ai:basic
|
|
|
|
profiles: ["hub"]
|
2024-11-16 18:08:56 +08:00
|
|
|
ports:
|
2024-11-18 21:00:06 +08:00
|
|
|
- "11235:11235"
|
|
|
|
- "8000:8000"
|
|
|
|
- "9222:9222"
|
|
|
|
- "8080:8080"
|
2024-11-16 18:08:56 +08:00
|
|
|
environment:
|
2024-11-18 21:00:06 +08:00
|
|
|
- CRAWL4AI_API_TOKEN=${CRAWL4AI_API_TOKEN:-}
|
|
|
|
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
|
|
|
|
- CLAUDE_API_KEY=${CLAUDE_API_KEY:-}
|
2024-11-16 18:08:56 +08:00
|
|
|
volumes:
|
2024-11-18 21:00:06 +08:00
|
|
|
- /dev/shm:/dev/shm
|
2024-11-16 18:08:56 +08:00
|
|
|
deploy:
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
memory: 4G
|
|
|
|
reservations:
|
|
|
|
memory: 1G
|
|
|
|
restart: unless-stopped
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "curl", "-f", "http://localhost:11235/health"]
|
|
|
|
interval: 30s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 3
|
2024-11-18 21:00:06 +08:00
|
|
|
start_period: 40s
|