-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (67 loc) · 1.66 KB
/
Copy pathdocker-compose.yml
File metadata and controls
72 lines (67 loc) · 1.66 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
version: "3.9"
services:
postgres:
image: pgvector/pgvector:pg16
environment:
POSTGRES_USER: ziri
POSTGRES_PASSWORD: ziri
POSTGRES_DB: ziri
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
- ./sql/001_init.sql:/docker-entrypoint-initdb.d/001_init.sql
- ./sql/002_vector_index.sql:/docker-entrypoint-initdb.d/002_vector_index.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ziri"]
interval: 5s
timeout: 3s
retries: 5
worker:
build:
context: .
dockerfile: docker/worker.Dockerfile
ports:
- "8001:8001"
env_file:
- .env
environment:
DATABASE_URL: postgresql://ziri:ziri@postgres:5432/ziri
depends_on:
postgres:
condition: service_healthy
api:
build:
context: .
dockerfile: docker/api.Dockerfile
ports:
- "8000:8000"
env_file:
- .env
environment:
WORKER_URL: http://worker:8001
DATABASE_URL: postgresql://ziri:ziri@postgres:5432/ziri
ELASTICSEARCH_URL: http://elasticsearch:9200
depends_on:
- worker
- elasticsearch
volumes:
- ./app/static:/app/app/static
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.13.0
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms256m -Xmx256m"
ports:
- "9200:9200"
volumes:
- esdata:/var/lib/elasticsearch/data
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:9200/_cluster/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
volumes:
pgdata:
esdata: