-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
92 lines (86 loc) · 2.19 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
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
92
services:
crawler_db:
container_name: crawler_db
image: postgres:14.5-alpine
restart: unless-stopped
env_file:
- .env
volumes:
- ./crawler_db_volume/:/var/lib/postgresql/data
crawler_api:
container_name: crawler_api
build: .
depends_on:
- crawler_db
env_file:
- .env
volumes:
- .:/app
- ./static:/app/crawler/static
- ./logs:/app/crawler/logs
ports:
- "127.0.0.1:8205:80"
command: ["python", "/app/crawler/manage.py", "runserver", "0:80"]
restart: unless-stopped
crawler_worker:
container_name: crawler_worker
build: .
working_dir: /app/crawler
command: ["celery", "-A", "crawler", "worker", "-l", "info", "--pidfile=", "--concurrency=1"]
env_file:
- .env
depends_on:
- crawler_db
- crawler_redis
volumes:
- .:/app
- ./logs:/app/crawler/logs
restart: unless-stopped
crawler_beat:
container_name: crawler_beat
build: .
working_dir: /app/crawler
command: ["celery", "-A", "crawler", "beat", "-l", "info", "--pidfile="]
env_file:
- .env
depends_on:
- crawler_db
- crawler_redis
volumes:
- .:/app
restart: unless-stopped
crawler_redis:
container_name: crawler-redis
image: redis:6.2
restart: unless-stopped
volumes:
- ./redis_volume_pro:/data
node-crawler_node_docker:
image: selenium/node-firefox:4.26.0-20241101
container_name: crawler_node_docker
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./assets:/opt/selenium/assets
depends_on:
- crawler_selenium_hub
environment:
- SE_EVENT_BUS_HOST=crawler-selenium-hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- JAVA_OPTS=-Dotel.traces.exporter=none
shm_size: 2g
ports:
- 7900:7900
restart: unless-stopped
crawler_selenium_hub:
image: selenium/hub:4.26.0-20241101
container_name: crawler-selenium-hub
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 4442:4442
- 4443:4443
- 4444:4444
environment:
- JAVA_OPTS=-Dotel.traces.exporter=none
restart: unless-stopped