Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
133 lines (124 loc) · 3.29 KB
/
Copy pathdocker-compose.yml
File metadata and controls
133 lines (124 loc) · 3.29 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
version: '3.8'
services:
# PostgreSQL with PostGIS
postgres:
image: postgis/postgis:15-3.3
container_name: improveit-postgres
environment:
POSTGRES_DB: improveit_dev
POSTGRES_USER: improveit
POSTGRES_PASSWORD: dev-password
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
- ./packages/database/schemas:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "pg_isready -U improveit"]
interval: 10s
timeout: 5s
retries: 5
# Redis
redis:
image: redis:7-alpine
container_name: improveit-redis
ports:
- "6379:6379"
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
# Zookeeper (for Kafka)
zookeeper:
image: confluentinc/cp-zookeeper:7.4.0
container_name: improveit-zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ports:
- "2181:2181"
volumes:
- zookeeper-data:/var/lib/zookeeper/data
- zookeeper-logs:/var/lib/zookeeper/log
# Kafka
kafka:
image: confluentinc/cp-kafka:7.4.0
container_name: improveit-kafka
depends_on:
- zookeeper
ports:
- "9092:9092"
- "9093:9093"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
volumes:
- kafka-data:/var/lib/kafka/data
# Elasticsearch
elasticsearch:
image: elasticsearch:8.9.0
container_name: improveit-elasticsearch
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ports:
- "9200:9200"
- "9300:9300"
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:9200/_cluster/health || exit 1"]
interval: 30s
timeout: 10s
retries: 5
# MinIO (S3-compatible storage)
minio:
image: minio/minio:latest
container_name: improveit-minio
command: server /data --console-address ":9001"
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
volumes:
- minio-data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
# TimescaleDB (for analytics time-series data)
timescaledb:
image: timescale/timescaledb:latest-pg15
container_name: improveit-timescaledb
environment:
POSTGRES_DB: improveit_analytics
POSTGRES_USER: improveit
POSTGRES_PASSWORD: dev-password
ports:
- "5433:5432"
volumes:
- timescale-data:/var/lib/postgresql/data
volumes:
postgres-data:
redis-data:
zookeeper-data:
zookeeper-logs:
kafka-data:
elasticsearch-data:
minio-data:
timescale-data:
networks:
default:
name: improveit-network