Commit Graph

40 Commits

Author SHA1 Message Date
nfel 56fa29c91b Fix admin port binding: 127.0.0.0 -> 127.0.0.1
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-04 22:01:25 +03:30
nfel e7410c1ac2 Use Playwright Noble as worker base, configure China apt mirror
- Worker stage: oci.reg.darano.ir//mcr.microsoft.com/playwright:v1.62.0-noble
  (Ubuntu 24.04 + Chromium + Python 3.12 + ffmpeg/xvfb pre-installed)
  No apt/pip/Python bootstrap needed — everything ships with the image.
  Only uv sync needed for project deps.

- Admin stage: stays on python:3.11-slim (no Chrome needed).
  Uses Debian mirror (mirrors.tuna.tsinghua.edu.cn) since deb.debian.org
  times out from our VPS location (Iran).

- No more apt-get install of chromium/pip/uv in the Dockerfile.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-04 22:00:56 +03:30
nfel 604d5e25c1 Revert worker to python:3.11-slim — Playwright images don't include Python
The mcr.microsoft.com/playwright images are language-agnostic Ubuntu
images with only Chromium/Chrome/Firefox, no Python runtime. Reverting
to python:3.11-slim for both admin and worker stages.

Worker now installs Chromium via apt, patches ChromeDriver at build
time, and uses the shared builder stage for dependency caching.

This eliminates the broken venv, missing pip/uv, and registry mirror
issues from previous iterations.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-04 21:53:55 +03:30
nfel c859028627 Bootstrap pip via ensurepip to install uv manager
ensurepip -> pip install uv (package manager) -> uv sync. Uses
python -m pip so no system pip CLI is needed.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-04 21:50:52 +03:30
nfel 040e57c3c0 Call uv by full path in single RUN layer
The install script doesn't modify PATH for the shell. Call uv via
full path (/root/.local/bin/uv) in the same RUN so there's no
layer boundary issue.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-04 21:50:26 +03:30
nfel 47fa0229b3 Install uv via curl in worker stage
The Playwright Noble image ships Python but not pip or uv in PATH.
Install uv directly via curl, then run uv sync natively so the venv
targets this image's Python 3.12 instead of copying a broken 3.11 venv.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-04 21:48:34 +03:30
nfel 82cf4f1f82 Remove double slash from FROM line — Docker parser doesn't support it
The // breaks Docker's stage name parsing (conflicts with 'AS').
Use oci.reg.darano.ir as a registry mirror in /etc/docker/daemon.json
if the local proxy requires the // prefix for path routing.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-04 21:46:35 +03:30
nfel 1ce57c3ea2 Fix worker rq not found — build venv natively in Playwright image
The Playwright Noble image ships Python 3.12 while the builder uses
python:3.11-slim. Copying the venv produced broken shebangs, causing
"exec /app/.venv/bin/rq: no such file or directory".

Fix: install uv in the worker stage and run uv sync natively so the
venv targets this image's Python version. Manifests copied first for
layer cache efficiency.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-04 21:39:51 +03:30
nfel 0bbd4ba840 Add double slash in Playwright registry mirror path
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-04 21:38:49 +03:30
nfel f60de9312a Use local registry mirror for Playwright image
Replace mcr.microsoft.com/playwright:v1.62.0-noble with
oci.reg.darano.ir/mcr.microsoft.com/playwright:latest for worker builds.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-04 21:28:19 +03:30
nfel 5bc7acd114 Remove --no-deps from Makefile docker-otp/docker-fresh
The worker needs Redis to connect and complete crawl runs. Removing
--no-deps so compose starts dependencies for one-off runs.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-04 21:20:54 +03:30
nfel e8d0108f9a 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>
2026-08-04 21:20:28 +03:30
nfel a436b72bec Use Playwright base image for worker services
Replace chromium/chromedriver apt installs with
mcr.microsoft.com/playwright:v1.62.0-noble for worker containers.
Admin service stays on python:3.11-slim since it doesn't need Chrome.

This removes the build-time patch_driver.py step since Playwright ships
with a pre-patched Chromium binary. Also split docker-compose into
separate images (seed-admin / seed-worker) with explicit build targets.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-08-04 21:19:12 +03:30
nfel 240104a3f2 docker network added to compose file 2026-08-04 20:58:10 +03:30
nfel 8639d641be update compose file 2026-08-04 20:54:21 +03:30
nfel 061b03eee5 Stabilize recorded Chrome startup 2026-08-03 00:55:53 +03:30
nfel 71790cf0ad Open target URL during Chrome startup 2026-08-03 00:42:09 +03:30
nfel 9f986255b3 Add admin favicon 2026-08-03 00:27:56 +03:30
nfel e6ee587bf0 Navigate before initializing page state 2026-08-03 00:21:55 +03:30
nfel 66c8c19e0c Record worker browser sessions 2026-08-02 23:23:23 +03:30
nfel 601b8ec69e Recover from slow browser navigation 2026-07-28 23:47:15 +03:30
nfel 823acdd128 Harden browser session cleanup 2026-07-28 23:30:02 +03:30
nfel 3982b03f5c Use packaged Chromium driver in Docker 2026-07-28 22:15:14 +03:30
nfel 4462990d6f Bundle patched ChromeDriver in Docker image 2026-07-28 22:00:19 +03:30
nfel 3f180e88ed Fix RQ worker invocation 2026-07-28 00:01:31 +03:30
nfel 983b5279a2 Fix Docker virtual environment packaging 2026-07-27 23:54:50 +03:30
nfel a5a9164a35 Use official PyPI for dependency resolution 2026-07-27 21:34:09 +03:30
nfel 943dc190a3 python version increased to 3.14 2026-07-27 15:49:33 +03:30
nfel 80a892478f submit changes 2026-07-27 15:42:08 +03:30
nfel 78265d92ba added stop/resume on found the first item 2026-06-30 19:20:06 +03:30
nfel 42ddcdd22e Added senario name in config selector. also now digipay works 2026-06-30 18:58:37 +03:30
nfel 3a1ceaaf2e added docker and docker compose 2026-06-30 17:57:07 +03:30
nfel 744550deaa Digipay and speedtest added 2026-06-27 16:18:33 +03:30
nfel 64886b2b10 updates :) 2026-06-20 17:07:48 +03:30
nfel 24155ad6bf wip 2026-06-16 16:56:27 +03:30
nfel a5d09be46e added db 2026-06-15 19:56:18 +03:30
nfel 7d61fd8322 admin now runs 2026-06-15 19:53:33 +03:30
nfel 6aa60860f2 ignore updates 2026-06-15 19:48:19 +03:30
nfel 70e78a2b31 deploy files added 2026-06-15 19:47:56 +03:30
nfel abff09dc0c init 2026-06-15 19:42:03 +03:30