-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
90 lines (85 loc) · 3.22 KB
/
Copy pathdocker-compose.yml
File metadata and controls
90 lines (85 loc) · 3.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
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
# OSS-only app services. Shared infrastructure (MongoDB, Redis) lives in the
# repo-root docker-compose.yml — start it first:
# cd .. && docker compose up -d mongodb redis
name: formulai-oss
services:
backend:
build:
context: .
dockerfile: server/Dockerfile
restart: unless-stopped
environment:
NODE_ENV: production
MONGODB_URI: mongodb://mongodb:27017/formulai
REDIS_HOST: redis
JWT_SECRET: ${JWT_SECRET:-secret}
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
FRONTEND_URL: http://localhost
MLFLOW_TRACKING_URI: ${MLFLOW_TRACKING_URI:-http://mlflow:5000}
MLFLOW_PROMPT_ALIAS: ${MLFLOW_PROMPT_ALIAS:-production}
MLFLOW_PROMPT_CACHE_TTL_SECONDS: ${MLFLOW_PROMPT_CACHE_TTL_SECONDS:-60}
MLFLOW_FLOWS_PATH: ${MLFLOW_FLOWS_PATH:-/app/mlflow/flows.yml}
LLM_SEMANTIC_CACHE_ENABLED: ${LLM_SEMANTIC_CACHE_ENABLED:-true}
LLM_SEMANTIC_CACHE_TTL_SECONDS: ${LLM_SEMANTIC_CACHE_TTL_SECONDS:-86400}
LLM_SEMANTIC_CACHE_SIMILARITY: ${LLM_SEMANTIC_CACHE_SIMILARITY:-0.95}
EMBEDDING_PROVIDER: ${EMBEDDING_PROVIDER:-local}
LOCAL_EMBEDDING_MODEL: ${LOCAL_EMBEDDING_MODEL:-Xenova/all-MiniLM-L6-v2}
LOCAL_EMBEDDING_WARMUP: ${LOCAL_EMBEDDING_WARMUP:-true}
LOCAL_EMBEDDING_THREADS: ${LOCAL_EMBEDDING_THREADS:-2}
LLM_EMBEDDING_DIMENSION: ${LLM_EMBEDDING_DIMENSION:-384}
TRANSFORMERS_CACHE: ${TRANSFORMERS_CACHE:-/var/lib/formulai/embeddings}
env_file:
- ./server/.env
networks:
- formulai-network
ports:
- "3001:3001"
worker:
build:
context: .
dockerfile: server/Dockerfile
restart: unless-stopped
environment:
NODE_ENV: production
MONGODB_URI: mongodb://mongodb:27017/formulai
REDIS_HOST: redis
JWT_SECRET: ${JWT_SECRET:-secret}
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
MLFLOW_TRACKING_URI: ${MLFLOW_TRACKING_URI:-http://mlflow:5000}
MLFLOW_PROMPT_ALIAS: ${MLFLOW_PROMPT_ALIAS:-production}
MLFLOW_PROMPT_CACHE_TTL_SECONDS: ${MLFLOW_PROMPT_CACHE_TTL_SECONDS:-60}
MLFLOW_FLOWS_PATH: ${MLFLOW_FLOWS_PATH:-/app/mlflow/flows.yml}
LLM_SEMANTIC_CACHE_ENABLED: ${LLM_SEMANTIC_CACHE_ENABLED:-true}
LLM_SEMANTIC_CACHE_TTL_SECONDS: ${LLM_SEMANTIC_CACHE_TTL_SECONDS:-86400}
LLM_SEMANTIC_CACHE_SIMILARITY: ${LLM_SEMANTIC_CACHE_SIMILARITY:-0.95}
EMBEDDING_PROVIDER: ${EMBEDDING_PROVIDER:-local}
LOCAL_EMBEDDING_MODEL: ${LOCAL_EMBEDDING_MODEL:-Xenova/all-MiniLM-L6-v2}
LOCAL_EMBEDDING_WARMUP: ${LOCAL_EMBEDDING_WARMUP:-true}
LOCAL_EMBEDDING_THREADS: ${LOCAL_EMBEDDING_THREADS:-2}
LLM_EMBEDDING_DIMENSION: ${LLM_EMBEDDING_DIMENSION:-384}
TRANSFORMERS_CACHE: ${TRANSFORMERS_CACHE:-/var/lib/formulai/embeddings}
env_file:
- ./server/.env
networks:
- formulai-network
working_dir: /app/server
command: ["node", "dist/src/worker"]
gateway:
build:
context: .
dockerfile: client/Dockerfile
args:
VITE_API_BASE_URL: /api
restart: unless-stopped
volumes:
- ./gateway/nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "80:80"
depends_on:
- backend
networks:
- formulai-network
networks:
formulai-network:
external: true
name: formulai-network