-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
168 lines (159 loc) · 4.4 KB
/
Copy pathdocker-compose.yml
File metadata and controls
168 lines (159 loc) · 4.4 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
158
159
160
161
162
163
164
165
166
167
168
version: '3.8'
services:
# PostgreSQL Database with PGVector Extension
postgres:
image: pgvector/pgvector:pg16
container_name: norman-postgres
environment:
POSTGRES_DB: norman_engine
POSTGRES_USER: norman_user
POSTGRES_PASSWORD: norman_password
POSTGRES_HOST_AUTH_METHOD: md5
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./docker/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
- ./docker/postgres/vector-setup.sql:/docker-entrypoint-initdb.d/vector-setup.sql
networks:
- norman-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U norman_user -d norman_engine"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
# Redis for Caching
redis:
image: redis:7.2-alpine
container_name: norman-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- norman-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
# Prometheus for Metrics Collection
prometheus:
image: prom/prometheus:v2.48.0
container_name: norman-prometheus
ports:
- "9090:9090"
volumes:
- ./docker/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--storage.tsdb.retention.time=200h'
- '--web.enable-lifecycle'
networks:
- norman-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:9090/metrics"]
interval: 10s
timeout: 5s
retries: 3
# Grafana for Visualization
grafana:
image: grafana/grafana:10.2.0
container_name: norman-grafana
ports:
- "3000:3000"
environment:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: norman_admin
GF_USERS_ALLOW_SIGN_UP: false
GF_INSTALL_PLUGINS: grafana-clock-panel,grafana-simple-json-datasource
volumes:
- grafana_data:/var/lib/grafana
- ./docker/grafana/provisioning:/etc/grafana/provisioning
- ./docker/grafana/dashboards:/var/lib/grafana/dashboards
networks:
- norman-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health"]
interval: 10s
timeout: 5s
retries: 3
# MinIO for File Storage (PDFs, documents)
minio:
image: minio/minio:RELEASE.2024-01-16T16-07-38Z
container_name: norman-minio
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: norman_minio
MINIO_ROOT_PASSWORD: norman_minio_password
volumes:
- minio_data:/data
command: server /data --console-address ":9001"
networks:
- norman-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 10s
timeout: 5s
retries: 3
# Jaeger for Distributed Tracing
jaeger:
image: jaegertracing/all-in-one:1.51
container_name: norman-jaeger
ports:
- "16686:16686"
- "14250:14250"
environment:
COLLECTOR_OTLP_ENABLED: true
networks:
- norman-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:16686"]
interval: 10s
timeout: 5s
retries: 3
# Nginx for Reverse Proxy and Load Balancing
nginx:
image: nginx:1.25-alpine
container_name: norman-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./docker/nginx/conf.d:/etc/nginx/conf.d
- ./docker/nginx/ssl:/etc/nginx/ssl
depends_on:
- postgres
- redis
networks:
- norman-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:80/health"]
interval: 10s
timeout: 5s
retries: 3
volumes:
postgres_data:
driver: local
redis_data:
driver: local
prometheus_data:
driver: local
grafana_data:
driver: local
minio_data:
driver: local
networks:
norman-network:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16