-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.override.yml
More file actions
119 lines (108 loc) · 2.37 KB
/
Copy pathdocker-compose.override.yml
File metadata and controls
119 lines (108 loc) · 2.37 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
services:
redis:
image: redis:7
command: [
"redis-server",
"--appendonly", "yes",
"--maxmemory-policy", "volatile-ttl"
]
volumes:
- redisdata:/data
postgres:
image: postgres:16
volumes:
- pgdata:/var/lib/postgresql/data
env_file:
- .env
worker-crawl:
build: .
command: celery -A core.celery_app worker -l info -Q crawl -c 1
depends_on:
- redis
- postgres
environment:
PYTHONPATH: /app
volumes:
- .:/app
env_file:
- .env
worker-scrape:
build: .
command: celery -A core.celery_app worker -l info -Q scrape -c 1
depends_on:
- redis
- postgres
environment:
PYTHONPATH: /app
volumes:
- .:/app
env_file:
- .env
beat:
build: .
command: celery -A core.celery_app beat -l info
depends_on:
- redis
- postgres
environment:
PYTHONPATH: /app
volumes:
- .:/app
env_file:
- .env
api:
build: .
command: uvicorn api.main:app --host 0.0.0.0 --port 8000 --reload
depends_on:
- redis
- postgres
environment:
PYTHONPATH: /app
ports:
- "9000:8000"
volumes:
- .:/app
env_file:
- .env
flower:
build: .
command: celery -A core.celery_app flower --port=5555 --address=0.0.0.0 --basic_auth=flower:saficodes
depends_on:
- redis
- worker-crawl
- worker-scrape
environment:
PYTHONPATH: /app
ports:
- "5555:5555"
volumes:
- .:/app
env_file:
- .env
# Apache Kafka
zookeeper:
image: confluentinc/cp-zookeeper:7.6.0
container_name: zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
kafka:
image: confluentinc/cp-kafka:7.6.0
container_name: kafka
depends_on:
- zookeeper
ports:
- "9092:9092"
- "29092:29092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:29092,PLAINTEXT_HOST://0.0.0.0:9092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
volumes:
redisdata:
pgdata: