fix: run kb worker on host network
This commit is contained in:
@@ -26,11 +26,16 @@ services:
|
|||||||
context: ${CRAWLER_DIR:-./crawler}
|
context: ${CRAWLER_DIR:-./crawler}
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
restart: always
|
restart: always
|
||||||
|
# test_sbnews is granted for 127.0.0.1; use host networking so MySQL
|
||||||
|
# sees the worker as a local client instead of a Docker bridge address.
|
||||||
|
network_mode: host
|
||||||
env_file:
|
env_file:
|
||||||
- ./.env.docker
|
- ./.env.docker
|
||||||
environment:
|
environment:
|
||||||
TZ: Asia/Shanghai
|
TZ: Asia/Shanghai
|
||||||
DQD_CONFIG_PATH: /app/config/settings.yaml
|
DQD_CONFIG_PATH: /app/config/settings.yaml
|
||||||
|
DQD_DB_HOST: 127.0.0.1
|
||||||
|
DQD_REDIS_HOST: 127.0.0.1
|
||||||
command: ["python", "scripts/kb_worker.py", "--batch=50", "--block-ms=5000", "--max-retries=3"]
|
command: ["python", "scripts/kb_worker.py", "--batch=50", "--block-ms=5000", "--max-retries=3"]
|
||||||
volumes:
|
volumes:
|
||||||
- ${CRAWLER_DIR:-./crawler}/logs:/app/logs
|
- ${CRAWLER_DIR:-./crawler}/logs:/app/logs
|
||||||
|
|||||||
Reference in New Issue
Block a user