-
Notifications
You must be signed in to change notification settings - Fork 125
/
docker-compose.yml
49 lines (43 loc) · 1.05 KB
/
docker-compose.yml
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
x-scrapy-common: &scrapy-common
build:
context: .
dockerfile: compose/Dockerfile # Use the merged Dockerfile
args:
BUILD_ENV: "production" # Use production environment
environment:
- PYTHONUNBUFFERED=0
depends_on:
- selenium
volumes:
- ./data:/app/data
services:
selenium:
container_name: selenium
image: selenium/standalone-chrome-debug
ports:
- "5900:5900"
shm_size: 128M
environment:
- VNC_NO_PASSWORD=1
scrapy_random:
<<: *scrapy-common
command: ["/start", "random"]
scrapy_companies:
<<: *scrapy-common
command: ["/start_companies"]
scrapy_byname:
<<: *scrapy-common
command: ["/start", "byname"]
scrapy_test:
build:
context: .
dockerfile: compose/Dockerfile # Use the same merged Dockerfile
args:
BUILD_ENV: "local" # Specify the local environment
environment:
- PYTHONUNBUFFERED=0
depends_on:
- selenium
volumes:
- .:/app
command: [ "py.test", "tests/companies.py", "tests/selenium.py"]