-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (67 loc) · 1.92 KB
/
Copy pathdocker-compose.yml
File metadata and controls
71 lines (67 loc) · 1.92 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
services:
postgres:
image: pgvector/pgvector:pg16
environment:
POSTGRES_DB: knowledge_wiki
POSTGRES_USER: knowledge
POSTGRES_PASSWORD: local-knowledge-only
ports: ["5433:5432"]
volumes:
- knowledge-postgres:/var/lib/postgresql/data
- ./infra/postgres/001-schema.sql:/docker-entrypoint-initdb.d/001-schema.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U knowledge -d knowledge_wiki"]
interval: 5s
timeout: 3s
retries: 20
neo4j:
image: neo4j:5.26
env_file: .env
environment:
NEO4J_server_memory_heap_initial__size: 256m
NEO4J_server_memory_heap_max__size: 512m
NEO4J_server_memory_pagecache_size: 256m
volumes:
- knowledge-neo4j-data:/data
- knowledge-neo4j-logs:/logs
healthcheck:
test: ["CMD-SHELL", "password=\"$${NEO4J_AUTH#neo4j/}\"; cypher-shell -u neo4j -p \"$$password\" 'RETURN 1' >/dev/null"]
interval: 10s
timeout: 5s
retries: 18
start_period: 20s
api:
build: ./server
env_file: .env.api
environment:
WIKI_ROOT: /data/wiki
DATABASE_URL: postgresql://knowledge:local-knowledge-only@postgres:5432/knowledge_wiki
HF_HOME: /models
NEO4J_URI: bolt://neo4j:7687
NEO4J_USER: neo4j
ports: ["8000:8000"]
volumes:
- ./data/wiki:/data/wiki
- knowledge-models:/models
depends_on:
postgres:
condition: service_healthy
neo4j:
condition: service_healthy
web:
build: ./web
environment:
VITE_API_URL: http://localhost:8000/api
ports: ["5173:5173"]
volumes:
- ./web/src:/app/src
- ./web/index.html:/app/index.html
- ./web/vite.config.ts:/app/vite.config.ts
- ./docs:/app/public/docs:ro
- ./data/wiki/docs:/app/public/wiki-docs:ro
depends_on: [api]
volumes:
knowledge-postgres:
knowledge-models:
knowledge-neo4j-data:
knowledge-neo4j-logs: