Fix Makefile for split admin/worker Docker targets

Update docker-otp/docker-fresh to use 'worker' service instead of
the removed 'crawler' service. Add --no-deps to one-off runs so they
don't inherit the RQ worker entrypoint.

Add worker-build target to rebuild just the Playwright-based worker,
and docker-admin-up for standalone admin-only deploys.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
2026-08-04 21:20:28 +03:30
parent a436b72bec
commit e8d0108f9a
+14 -6
View File
@@ -85,10 +85,13 @@ batch: ## Run many parallel runners (WORKERS=3 RUNS=10 STAGGER=500)
# ── Docker ────────────────────────────────────────────────────────────────────
build: ## Build the Docker image
build: ## Build all Docker images (admin + worker)
docker compose build
up: ## Start admin panel in Docker (detached)
worker-build: ## Rebuild worker with Playwright base image
docker compose build worker
up: ## Start all services in Docker (detached)
docker compose up -d
@echo "$(GREEN)Admin panel:$(RESET) http://localhost:8000"
@@ -101,16 +104,21 @@ logs: ## Follow container logs
shell: ## Open a shell in the running admin container
docker compose exec admin bash
# Crawler one-shots inside Docker
# Worker one-off commands (override the default RQ worker command)
docker-worker: ## Start RQ worker interactively (for debugging)
docker compose run --rm --no-deps worker
docker-otp: ## Run OTP scenario in Docker (PHONE=+98...)
ifdef PHONE
docker compose run --rm crawler python main.py otp --phone $(PHONE)
docker compose run --rm --no-deps -e PHONE=$(PHONE) worker python main.py otp --phone $(PHONE)
else
docker compose run --rm crawler python main.py otp
docker compose run --rm --no-deps worker python main.py otp
endif
docker-fresh: ## Run fresh-session scenario in Docker
docker compose run --rm crawler python main.py fresh
docker compose run --rm --no-deps worker python main.py fresh
docker-admin-up: ## Start only the admin panel in Docker (detached)
docker compose up -d admin
# ── Housekeeping ──────────────────────────────────────────────────────────────