almost ready

This commit is contained in:
bob
2026-06-01 10:52:06 -05:00
parent 8b0eb0db78
commit 763305ca89
94 changed files with 8766 additions and 2674 deletions

View File

@@ -1,14 +1,19 @@
# One-command startup for the cs.money scraper control plane + worker.
# One-command startup for the scraper control plane + per-market workers.
# Postgres is external (runs independently on the host); the C2 connects to it via
# host.docker.internal and auto-applies EF migrations on boot.
#
# docker compose up --build
#
# Scale workers (drop the worker `ports:` first — noVNC can't share one host port):
# docker compose up --build --scale worker=10
# Worker counts per market are env-driven (deploy.replicas), so one command sets the mix —
# e.g. 1 skin.land worker and 0 cs.money workers (PowerShell):
# $env:CSMONEY_WORKERS=0; $env:SKINLAND_WORKERS=1; docker compose up --build
# bash/sh:
# CSMONEY_WORKERS=0 SKINLAND_WORKERS=1 docker compose up --build
# (Or set them in a .env file next to this compose file.) Defaults: 1 of each.
#
# Each worker mints its own IPRoyal sticky session at startup, so every replica gets a
# distinct residential exit IP. Set IPROYAL_USERNAME / IPROYAL_PASSWORD (e.g. in a .env
# file next to this compose file) to turn the proxy on.
# distinct residential exit IP. Set IPROYAL_USERNAME / IPROYAL_PASSWORD (.env works) to
# turn the proxy on. The worker `ports:` are ephemeral so replicas never collide.
services:
c2:
build:
@@ -33,7 +38,11 @@ services:
build:
context: .
dockerfile: worker/Dockerfile
# cs.money worker count. Set CSMONEY_WORKERS=0 to run none (e.g. skin.land-only).
deploy:
replicas: ${CSMONEY_WORKERS:-1}
environment:
WORKER_SCRIPT: csmoney_worker.py # (also the image default; explicit for symmetry)
C2_URL: http://c2:5080
WORKER_TOKEN: ${WORKER_TOKEN:-dev-worker-token}
# IPRoyal residential proxy: each replica self-assigns a unique sticky session
@@ -53,3 +62,30 @@ services:
# http://localhost:<mapped>/vnc.html to watch / solve a challenge.
- "6080"
restart: unless-stopped
# The skin.land worker: same image, but runs skinland_worker.py against the C2's
# /skinland job group and warms on a skin.land page. Each replica gets its own IPRoyal
# sticky exit IP exactly like the cs.money worker. Count via SKINLAND_WORKERS.
skinland-worker:
build:
context: .
dockerfile: worker/Dockerfile
deploy:
replicas: ${SKINLAND_WORKERS:-1}
environment:
WORKER_SCRIPT: skinland_worker.py
C2_URL: http://c2:5080
MARKET_URL: ${SKINLAND_MARKET_URL:-https://skin.land/market/csgo/}
WORKER_TOKEN: ${WORKER_TOKEN:-dev-worker-token}
IPROYAL_USERNAME: ${IPROYAL_USERNAME:-}
IPROYAL_PASSWORD: ${IPROYAL_PASSWORD:-}
IPROYAL_COUNTRY: ${IPROYAL_COUNTRY:-us}
IPROYAL_LIFETIME_MIN: ${IPROYAL_LIFETIME_MIN:-60}
PROXY: ${PROXY:-}
SOLVE_SECONDS: ${SOLVE_SECONDS:-45}
LOAD_IMAGES: ${LOAD_IMAGES:-}
depends_on:
- c2
ports:
- "6080"
restart: unless-stopped