-
Notifications
You must be signed in to change notification settings - Fork 263
/
docker-compose.dev.yaml
111 lines (96 loc) · 2.74 KB
/
docker-compose.dev.yaml
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
services:
backend:
depends_on:
- db
- searxng
build:
context: .
dockerfile: ./src/backend/Dockerfile
restart: always
ports:
- "8000:8000"
environment:
- SEARCH_PROVIDER=${SEARCH_PROVIDER:-searxng}
- SEARXNG_BASE_URL=${SEARXNG_BASE_URL:-http://searxng:8080}
- TAVILY_API_KEY=${TAVILY_API_KEY}
- SERPER_API_KEY=${SERPER_API_KEY}
- BING_API_KEY=${BING_API_KEY}
- OLLAMA_API_BASE=${OLLAMA_API_BASE:-http://host.docker.internal:11434}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- OPENAI_API_BASE=${OPENAI_API_BASE}
- GROQ_API_KEY=${GROQ_API_KEY}
- AZURE_DEPLOYMENT_NAME=${AZURE_DEPLOYMENT_NAME}
- AZURE_API_KEY=${AZURE_API_KEY}
- AZURE_API_BASE=${AZURE_API_BASE}
- AZURE_API_VERSION=${AZURE_API_VERSION}
- OPENAI_MODE=${OPENAI_MODE}
- CUSTOM_MODEL=${CUSTOM_MODEL}
- DATABASE_URL=${DATABASE_URL:-postgresql+psycopg2://postgres:password@db:5432/postgres}
- DB_ENABLED=${DB_ENABLED:-True}
- RATE_LIMIT_ENABLED=${RATE_LIMIT_ENABLED:-False}
- REDIS_URL=${REDIS_URL}
- ENABLE_LOCAL_MODELS=${ENABLE_LOCAL_MODELS:-True}
entrypoint: >
/bin/sh -c "
cd /workspace/src/backend &&
alembic upgrade head &&
uvicorn main:app --host 0.0.0.0 --port 8000
"
develop:
watch:
- action: sync
path: ./src/backend
target: /workspace/src/backend
networks:
- farfalle-network
extra_hosts:
- "host.docker.internal:host-gateway"
frontend:
depends_on:
- backend
build:
context: .
dockerfile: ./src/frontend/Dockerfile
args:
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:8000}
- NEXT_PUBLIC_LOCAL_MODE_ENABLED=${NEXT_PUBLIC_LOCAL_MODE_ENABLED:-true}
- NEXT_PUBLIC_PRO_MODE_ENABLED=${NEXT_PUBLIC_PRO_MODE_ENABLED:-true}
restart: always
ports:
- "3000:3000"
develop:
watch:
- action: sync
path: ./src/frontend
target: /app
ignore:
- node_modules/
networks:
- farfalle-network
searxng:
image: docker.io/searxng/searxng:latest
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- ./searxng:/etc/searxng:rw
networks:
- farfalle-network
db:
image: postgres:15.2-alpine
restart: always
environment:
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-password}
- POSTGRES_DB=${POSTGRES_DB:-postgres}
ports:
- "5432:5432"
volumes:
- db_volume:/var/lib/postgresql/data
networks:
- farfalle-network
networks:
farfalle-network:
name: farfalle-network
volumes:
db_volume: