forked from Ontos-AI/knowhere-self-hosted
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
89 lines (85 loc) · 2.47 KB
/
Copy pathcompose.yaml
File metadata and controls
89 lines (85 loc) · 2.47 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
services:
app:
image: ${KNOWHERE_IMAGE:-ghcr.io/ontos-ai/knowhere:latest}
env_file:
- path: .env.defaults
required: true
- path: .env
required: false
ports:
- "${DASHBOARD_HOST_BIND:-127.0.0.1}:${DASHBOARD_HOST_PORT:-3000}:3000"
- "${API_HOST_BIND:-127.0.0.1}:${API_HOST_PORT:-5005}:5005"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
localstack:
condition: service_healthy
volumes:
- knowhere_user_data:/data/users
- knowhere_model_cache:/data/models
- knowhere_secrets:/data/secrets
postgres:
image: postgres:15-alpine
environment:
POSTGRES_DB: Knowhere
POSTGRES_USER: root
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-root123}
POSTGRES_INITDB_ARGS: "--encoding=UTF-8 --lc-collate=C --lc-ctype=C"
ports:
- "${POSTGRES_HOST_BIND:-127.0.0.1}:${POSTGRES_HOST_PORT:-5432}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U root -d Knowhere"]
interval: 30s
timeout: 10s
retries: 5
redis:
image: redis:7-alpine
command: redis-server --appendonly yes --maxmemory 2gb --maxmemory-policy allkeys-lru --stop-writes-on-bgsave-error no
ports:
- "${REDIS_HOST_BIND:-127.0.0.1}:${REDIS_HOST_PORT:-6379}:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 5
localstack:
image: localstack/localstack:3.8
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
SERVICES: s3,sns,sqs,iam,sts
DEBUG: "1"
PERSISTENCE: "1"
DATA_DIR: /var/lib/localstack/data
S3_SKIP_SIGNATURE_VALIDATION: "1"
S3_SKIP_SSL_VERIFICATION: "1"
LOCALSTACK_HOST: localstack:4566
HOSTNAME_EXTERNAL: localstack
EDGE_PORT: "4566"
SNS_ENDPOINT_STRATEGY: domain
ports:
- "${LOCALSTACK_HOST_BIND:-127.0.0.1}:${LOCALSTACK_HOST_PORT:-4566}:4566"
volumes:
- localstack_data:/var/lib/localstack
networks:
default:
aliases:
- localhost.localstack.cloud
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4566/_localstack/health"]
interval: 30s
timeout: 10s
retries: 5
volumes:
knowhere_user_data:
knowhere_model_cache:
knowhere_secrets:
postgres_data:
redis_data:
localstack_data: