-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
69 lines (65 loc) · 2.66 KB
/
docker-compose.yaml
File metadata and controls
69 lines (65 loc) · 2.66 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
services:
woo_scraper:
build:
context: ./woo # Assuming 'woo' is a subdirectory with Dockerfile & script
dockerfile: Dockerfile
image: spamfake2022/woo-scraper:latest # Will try to pull, then build if not found/forced
container_name: woo_scraper_app
ports:
# Maps <host_port>:<container_port>
# The container_port should match what the Flask app inside is listening on
- "${HOST_PORT_WOO:-5002}:${FLASK_PORT_WOO:-5002}"
environment:
- DB_HOST=${DB_HOST}
- DB_USER=${DB_USER}
- DB_NAME=${WOO_DB_NAME}
- DB_PASSWORD=${DB_PASSWORD}
- CATEGORIES_FILE_PATH_IN_CONTAINER=${WOO_CATEGORIES_FILE:-barefoot_categories.json} # Match script arg, provide default filename
- FLASK_PORT_WOO=${FLASK_PORT_WOO:-5002} # Ensure Flask app uses this port
networks:
- app_network
shopify_scraper:
build:
context: ./shopify # Assuming 'shopify' is a subdirectory
dockerfile: Dockerfile
image: spamfake2022/shop-scraper:latest
container_name: shopify_scraper_app
ports:
- "${HOST_PORT_SHOPIFY:-5001}:${FLASK_PORT_SHOPIFY:-5001}"
environment:
- DB_HOST=${DB_HOST}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_NAME=${SHOPIFY_DB_NAME}
- STORES_FILE_PATH_IN_CONTAINER=${SHOPIFY_STORES_FILE:-stores.json} # Match script arg, provide default filename
- FLASK_PORT_SHOPIFY=${FLASK_PORT_SHOPIFY:-5001} # Ensure Flask app uses this port
networks:
- app_network
# You might add your Analyzer service here as well
# analyzer:
# build:
# context: ./analyzer
# dockerfile: Dockerfile
# image: spamfake2022/product-analyzer:latest # Example image name
# container_name: product_analyzer_app
# ports:
# - "${HOST_PORT_ANALYZER:-5003}:${FLASK_PORT_ANALYZER:-5003}" # If it also has a Flask API
# environment:
# - DB_HOST=${DB_HOST}
# - DB_USER=${DB_USER}
# - DB_PASSWORD=${DB_PASSWORD}
# - DB_NAME_SHOPIFY=${SHOPIFY_DB_NAME} # Needs access to scraper output DBs
# - DB_NAME_WOOCOMMERCE=${WOO_DB_NAME} #
# - DB_NAME_ANALYSIS=${ANALYSIS_DB_NAME} # Where it writes its results
# - TOP_K_OVERALL=${TOP_K_OVERALL:-20}
# # ... other analyzer params ...
# - FLASK_PORT_ANALYZER=${FLASK_PORT_ANALYZER:-5003}
# networks:
# - app_network
# depends_on: # Optional: if you want scrapers to ideally finish before analyzer runs via API
# - woo_scraper # This doesn't guarantee completion, just startup order
# - shopify_scraper
networks:
app_network:
driver: bridge
name: web_scraping_services_network # Giving the network a more descriptive name