-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
39 lines (35 loc) · 1.03 KB
/
Copy pathdocker-compose.yml
File metadata and controls
39 lines (35 loc) · 1.03 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
version: '3.8'
services:
postgres:
image: postgres:15
ports:
- "5432:5432"
environment:
- POSTGRES_DB="eidolon"
- POSTGRES_USER="mathisto"
- POSTGRES_PASSWORD=${EIDOLON_PG_PASS}
volumes:
- postgres_data:/var/lib/postgresql/data
command: |
sh -c "pg_restore --no-password --exit-on-error || pg_ctl initdb && \
echo 'host all all trust' >> /etc/pg_hba.conf && \
echo 'enable_TLS = off' > /var/lib/postgresql/data/pg_config.txt && \
pg_ctl start"
# Install and enable pgvector
init:
postgres: |
psql -U $POSTGRES_USER -d $POSTGRES_DB -c "CREATE EXTENSION IF NOT EXISTS pgvector;"
eidolon:
build: .
ports:
- "8080:8080"
environment:
- PORT=8080
- DB_URL=postgresql://mathisto:${EIDOLON_PG_PASS}@postgres:5432/eidolon
- OPENAI_API_KEY=${OPENAI_API_KEY}
- OLLAMA_API_URL=http://100.108.91.106:11434
- ACTIVE_LLM=openai
depends_on:
- postgres
volumes:
postgres_data: