-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
91 lines (87 loc) · 3.69 KB
/
Copy pathdocker-compose.yml
File metadata and controls
91 lines (87 loc) · 3.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Same as docker-compose.yaml — duplicate extension for tools that default to .yml
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ebayhist
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-ebayhist_dev_change_me}
POSTGRES_DB: ebay_history
volumes:
- postgres_data:/var/lib/postgresql/data
- ./ebay-history-stack/migrations/001_init.sql:/docker-entrypoint-initdb.d/001_init.sql:ro
- ./ebay-history-stack/migrations/002_pc_scrape.sql:/docker-entrypoint-initdb.d/002_pc_scrape.sql:ro
- ./ebay-history-stack/migrations/003_pc_product_metadata.sql:/docker-entrypoint-initdb.d/003_pc_product_metadata.sql:ro
# Keep Postgres internal-only. Do not publish 5432 publicly.
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ebayhist -d ebay_history"]
interval: 5s
timeout: 5s
retries: 5
api:
build:
context: ./ebay-history-stack/api
dockerfile: Dockerfile
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: postgres://ebayhist:${POSTGRES_PASSWORD:-ebayhist_dev_change_me}@postgres:5432/ebay_history
API_KEY: ${API_KEY:-dev-insecure-change-me}
PORT: 3001
ports:
- "${API_PORT:-3001}:3001"
crawler:
build:
context: ./ebay-history-stack/crawler
dockerfile: Dockerfile
restart: unless-stopped
tty: true
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: postgres://ebayhist:${POSTGRES_PASSWORD:-ebayhist_dev_change_me}@postgres:5432/ebay_history
CRAWLER_ENABLED: ${CRAWLER_ENABLED:-true}
GLOBAL_PAGES_PER_DAY: ${GLOBAL_PAGES_PER_DAY:-1000}
US_SHARE: ${US_SHARE:-0.5}
UK_SHARE: ${UK_SHARE:-0.5}
MIN_DELAY_MS: ${MIN_DELAY_MS:-8000}
MAX_DELAY_MS: ${MAX_DELAY_MS:-45000}
PARSE_VERSION: "1"
US_SEED_URL: ${US_SEED_URL:-https://www.ebay.com/sch/i.html?_sacat=31392&LH_Sold=1&LH_Complete=1&_ipg=60&rt=nc}
# Never use _sacat=0 on ebay.co.uk — redirects to /b/0/ error page.
UK_SEED_URL: ${UK_SEED_URL:-https://www.ebay.co.uk/sch/i.html?_nkw=pokemon+card&LH_Sold=1&LH_Complete=1&_ipg=60&rt=nc}
ITEM_PRICE_ENRICH: ${ITEM_PRICE_ENRICH:-true}
ITEM_PRICE_ENRICH_MAX: ${ITEM_PRICE_ENRICH_MAX:-0}
ITEM_NAV_MIN_MS: ${ITEM_NAV_MIN_MS:-400}
ITEM_NAV_MAX_MS: ${ITEM_NAV_MAX_MS:-1400}
ITEM_PRICE_OCR: ${ITEM_PRICE_OCR:-true}
pc-crawler:
build:
context: ./ebay-history-stack
dockerfile: pc-crawler/Dockerfile
restart: unless-stopped
tty: true
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: postgres://ebayhist:${POSTGRES_PASSWORD:-ebayhist_dev_change_me}@postgres:5432/ebay_history
PC_CRAWLER_ENABLED: ${PC_CRAWLER_ENABLED:-true}
# pokemon_category = TCG hub → each /console/pokemon-* set → /game/ cards only. search = keyword search-products.
PC_DISCOVERY_MODE: ${PC_DISCOVERY_MODE:-pokemon_category}
PC_CATEGORY_URL: ${PC_CATEGORY_URL:-https://www.pricecharting.com/category/pokemon-cards}
PC_CATEGORY_MAX_SET_PAGES: ${PC_CATEGORY_MAX_SET_PAGES:-0}
PC_ONLY_POKEMON_GAME_URLS: ${PC_ONLY_POKEMON_GAME_URLS:-true}
PC_SEARCH_QUERY: ${PC_SEARCH_QUERY:-pikachu}
PC_PRODUCTS_PER_RUN: ${PC_PRODUCTS_PER_RUN:-0}
PC_FETCH_CONCURRENCY: ${PC_FETCH_CONCURRENCY:-2}
PC_SEARCH_PAGE_CONCURRENCY: ${PC_SEARCH_PAGE_CONCURRENCY:-3}
PC_MIN_DELAY_MS: ${PC_MIN_DELAY_MS:-3000}
PC_MAX_DELAY_MS: ${PC_MAX_DELAY_MS:-14000}
PC_LOOP_INTERVAL_MS: ${PC_LOOP_INTERVAL_MS:-3600000}
PARSE_VERSION: ${PC_PARSE_VERSION:-1}
volumes:
postgres_data: