-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (47 loc) · 1.22 KB
/
docker-compose.yml
File metadata and controls
51 lines (47 loc) · 1.22 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
version: '3.8'
services:
api:
build:
context: .
dockerfile: Dockerfile
container_name: knowledge-graph-api
restart: unless-stopped
ports:
- "8080:8000"
environment:
- DATABASE_URL=postgresql://postgres:postgres@db:5432/knowledgegraph
- PORT=8000
# Uncomment and fill in your API keys or use .env file
# - OPENAI_API_KEY=${OPENAI_API_KEY}
# - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
volumes:
# Mount for development (uncomment for local development)
- ./server:/app/server
- ./shared:/app/shared
# For .env file
- ./.env:/app/.env:ro
depends_on:
- db
networks:
- knowledge-graph-network
db:
image: postgres:14-alpine
container_name: knowledge-graph-db
restart: unless-stopped
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=knowledgegraph
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- knowledge-graph-network
networks:
knowledge-graph-network:
driver: bridge
volumes:
postgres_data:
# Set to 'true' to persist data, 'false' to discard on container down
external: false