-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
157 lines (148 loc) · 3.65 KB
/
docker-compose.yml
File metadata and controls
157 lines (148 loc) · 3.65 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
services:
web:
build: .
command: daphne -b 0.0.0.0 -p 8000 core.asgi:application
volumes:
- .:/app
ports:
- "8000:8000"
env_file:
- .env
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
environment:
- DB_HOST=db
- DB_PORT=5432
- POSTGRES_HOST=db
- BROKER_URL=redpanda:9092
- OPENSEARCH_URL=http://opensearch:9200
worker:
build: .
command: celery -A core worker -l info
volumes:
- .:/app
env_file:
- .env
depends_on:
- db
- redis
environment:
- DB_HOST=db
- DB_PORT=5432
- POSTGRES_HOST=db
db:
image: postgis/postgis:16-3.4
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=${DB_NAME:-somon_db}
- POSTGRES_USER=${DB_USER:-postgres}
- POSTGRES_PASSWORD=${DB_PASSWORD:-postgres}
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-postgres} -d ${DB_NAME:-somon_db}"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
ports:
- "6379:6379"
redpanda:
image: docker.redpanda.com/redpandadata/redpanda:latest
command:
- redpanda start
- --smp 1
- --memory 1G
- --reserve-memory 0M
- --overprovisioned
- --kafka-addr internal://0.0.0.0:9092,external://0.0.0.0:19092
- --advertise-kafka-addr internal://redpanda:9092,external://localhost:19092
- --pandaproxy-addr internal://0.0.0.0:8082,external://0.0.0.0:18082
- --advertise-pandaproxy-addr internal://redpanda:8082,external://localhost:18082
- --schema-registry-addr internal://0.0.0.0:8081,external://0.0.0.0:18081
- --rpc-addr 0.0.0.0:33145
- --advertise-rpc-addr redpanda:33145
- --check=false
- --set redpanda.developer_mode=true
ports:
- 18081:18081
- 18082:18082
- 19092:19092
- 9644:9644
volumes:
- redpanda_data:/var/lib/redpanda/data
healthcheck:
test: ["CMD-SHELL", "rpk cluster info"]
interval: 10s
timeout: 5s
retries: 5
opensearch:
image: opensearchproject/opensearch:2.11.0
container_name: opensearch
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- DISABLE_SECURITY_PLUGIN=true
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
ports:
- 9200:9200
- 9600:9600
volumes:
- opensearch_data:/usr/share/opensearch/data
opensearch-dashboards:
image: opensearchproject/opensearch-dashboards:2.11.0
ports:
- 5601:5601
environment:
- 'OPENSEARCH_HOSTS=["http://opensearch:9200"]'
- DISABLE_SECURITY_DASHBOARDS_PLUGIN=true
depends_on:
- opensearch
indexer:
build: .
command: uv run faststream run search_service.main:app
volumes:
- .:/app
depends_on:
redpanda:
condition: service_healthy
opensearch:
condition: service_started
env_file:
- .env
environment:
- BROKER_URL=redpanda:9092
- OPENSEARCH_URL=http://opensearch:9200
relay:
build: .
command: python manage.py run_outbox_relay
volumes:
- .:/app
env_file:
- .env
depends_on:
db:
condition: service_healthy
redpanda:
condition: service_healthy
environment:
- DB_HOST=db
- DB_PORT=5432
- POSTGRES_HOST=db
- BROKER_URL=redpanda:9092
volumes:
postgres_data:
redpanda_data:
opensearch_data: