-
-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
136 lines (127 loc) · 3.59 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
136 lines (127 loc) · 3.59 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
# Services tagged with the `no-auto-start` profile (extralit server/worker,
# postgres, kibana) do NOT start with a plain `docker compose up -d` — only
# minio, elasticsearch, and redis do. This suits local dev where the server and
# database run outside compose. To run the full stack in Docker:
# docker compose --profile no-auto-start up -d
x-common-variables: &common-variables
EXTRALIT_HOME_PATH: /var/lib/extralit
EXTRALIT_ELASTICSEARCH: http://elasticsearch:9200
EXTRALIT_DATABASE_URL: postgresql+asyncpg://postgres:postgres@postgres:5432/extralit
EXTRALIT_REDIS_URL: redis://redis:6379/0
services:
extralit:
image: extralitdev/extralit-server:latest
profiles:
- no-auto-start
restart: unless-stopped
ports:
- "6900:6900"
environment:
<<: *common-variables
USERNAME: extralit
PASSWORD: 12345678
API_KEY: extralit.apikey
WORKSPACE: default
# Uncomment the following line to reindex Extralit datasets into the search engine when starting up
# REINDEX_DATASETS: 1
# Opt-out for telemetry https://huggingface.co/docs/huggingface_hub/main/en/package_reference/utilities#huggingface_hub.utils.send_telemetry
# HF_HUB_DISABLE_TELEMETRY: 1
# HF_HUB_OFFLINE: 1
networks:
- extralit
volumes:
# EXTRALIT_HOME_PATH is used to define where Extralit will save it's application data.
# If you change EXTRALIT_HOME_PATH value please copy that same value to extralitdata volume too.
- extralitdata:/var/lib/extralit
depends_on:
- postgres
- elasticsearch
- redis
worker:
image: extralitdev/extralit-server:latest
profiles:
- no-auto-start
environment:
<<: *common-variables
BACKGROUND_NUM_WORKERS: 2
networks:
- extralit
volumes:
- extralitdata:/var/lib/extralit
depends_on:
- postgres
- elasticsearch
- redis
command: sh -c 'python -m extralit_server worker --num-workers $${BACKGROUND_NUM_WORKERS}'
postgres:
image: postgres:14
profiles:
- no-auto-start
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: extralit
networks:
- extralit
ports:
- "5432:5432"
volumes:
- postgresdata:/var/lib/postgresql/data
minio:
image: quay.io/minio/minio:RELEASE.2024-08-29T01-40-52Z
command: minio server /data --console-address :9090
environment:
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
networks:
- extralit
ports:
- "9001:9000"
- "9090:9090"
deploy:
resources:
limits:
memory: 256M
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.17.0
environment:
- ES_JAVA_OPTS=-Xms512m -Xmx512m
- node.name=elasticsearch
- cluster.name=es-extralit-local
- discovery.type=single-node
- cluster.routing.allocation.disk.threshold_enabled=false
- xpack.security.enabled=false
ulimits:
memlock:
soft: -1
hard: -1
networks:
- extralit
ports:
- "9200:9200"
- "9300:9300"
volumes:
- elasticdata:/usr/share/elasticsearch/data/
kibana:
profiles:
- no-auto-start
image: docker.elastic.co/kibana/kibana:8.5.3
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
ports:
- "5601:5601"
depends_on:
- elasticsearch
redis:
image: redis
networks:
- extralit
ports:
- "6379:6379"
networks:
extralit:
driver: bridge
volumes:
extralitdata:
elasticdata:
postgresdata: