welcome to onyx

This commit is contained in:
pablodanswer
2024-12-13 09:48:43 -08:00
parent 54dcbfa288
commit 21ec5ed795
813 changed files with 7021 additions and 6824 deletions

View File

@@ -28,15 +28,15 @@ spec:
spec:
containers:
- name: api-server
image: danswer/danswer-backend:latest
image: onyxdotapp/onyx-backend:latest
imagePullPolicy: IfNotPresent
command:
- "/bin/sh"
- "-c"
- |
alembic upgrade head &&
echo "Starting Danswer Api Server" &&
uvicorn danswer.main:app --host 0.0.0.0 --port 8080
echo "Starting Onyx Api Server" &&
uvicorn onyx.main:app --host 0.0.0.0 --port 8080
ports:
- containerPort: 8080
# There are some extra values since this is shared between services
@@ -45,17 +45,17 @@ spec:
- name: OAUTH_CLIENT_ID
valueFrom:
secretKeyRef:
name: danswer-secrets
name: onyx-secrets
key: google_oauth_client_id
- name: OAUTH_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: danswer-secrets
name: onyx-secrets
key: google_oauth_client_secret
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: danswer-secrets
name: onyx-secrets
key: redis_password
envFrom:
- configMapRef:

View File

@@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: background
image: danswer/danswer-backend:latest
image: onyxdotapp/onyx-backend:latest
imagePullPolicy: IfNotPresent
command:
- "/bin/sh"
@@ -28,7 +28,7 @@ spec:
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: danswer-secrets
name: onyx-secrets
key: redis_password
envFrom:
- configMapRef:

View File

@@ -2,18 +2,17 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: env-configmap
data:
data:
# Auth Setting, also check the secrets file
AUTH_TYPE: "disabled" # Change this for production uses unless Danswer is only accessible behind VPN
ENCRYPTION_KEY_SECRET: "" # This should not be specified directly in the yaml, this is just for reference
SESSION_EXPIRE_TIME_SECONDS: "86400" # 1 Day Default
VALID_EMAIL_DOMAINS: "" # Can be something like danswer.ai, as an extra double-check
AUTH_TYPE: "disabled" # Change this for production uses unless Onyx is only accessible behind VPN
ENCRYPTION_KEY_SECRET: "" # This should not be specified directly in the yaml, this is just for reference
SESSION_EXPIRE_TIME_SECONDS: "86400" # 1 Day Default
VALID_EMAIL_DOMAINS: "" # Can be something like onyx.app, as an extra double-check
SMTP_SERVER: "" # For sending verification emails, if unspecified then defaults to 'smtp.gmail.com'
SMTP_PORT: "" # For sending verification emails, if unspecified then defaults to '587'
SMTP_USER: "" # 'your-email@company.com'
SMTP_PASS: "" # 'your-gmail-password'
EMAIL_FROM: "" # 'your-email@company.com' SMTP_USER missing used instead
SMTP_USER: "" # 'your-email@company.com'
SMTP_PASS: "" # 'your-gmail-password'
EMAIL_FROM: "" # 'your-email@company.com' SMTP_USER missing used instead
CORS_ALLOWED_ORIGIN: ""
# Gen AI Settings
GEN_AI_MAX_TOKENS: ""
@@ -63,23 +62,23 @@ data:
NOTION_CONNECTOR_ENABLE_RECURSIVE_PAGE_LOOKUP: ""
MAX_DOCUMENT_CHARS: ""
MAX_FILE_SIZE_BYTES: ""
# DanswerBot SlackBot Configs
# OnyxBot SlackBot Configs
DANSWER_BOT_DISABLE_DOCS_ONLY_ANSWER: ""
DANSWER_BOT_DISPLAY_ERROR_MSGS: ""
DANSWER_BOT_RESPOND_EVERY_CHANNEL: ""
DANSWER_BOT_DISABLE_COT: "" # Currently unused
DANSWER_BOT_DISABLE_COT: "" # Currently unused
NOTIFY_SLACKBOT_NO_ANSWER: ""
# Logging
# Optional Telemetry, please keep it on (nothing sensitive is collected)? <3
# https://docs.danswer.dev/more/telemetry
# https://docs.onyx.app/more/telemetry
DISABLE_TELEMETRY: ""
LOG_LEVEL: ""
LOG_ALL_MODEL_INTERACTIONS: ""
LOG_DANSWER_MODEL_INTERACTIONS: ""
LOG_VESPA_TIMING_INFORMATION: ""
# Shared or Non-backend Related
INTERNAL_URL: "http://api-server-service:80" # for web server
WEB_DOMAIN: "http://localhost:3000" # for web server and api server
DOMAIN: "localhost" # for nginx
INTERNAL_URL: "http://api-server-service:80" # for web server
WEB_DOMAIN: "http://localhost:3000" # for web server and api server
DOMAIN: "localhost" # for nginx
# Chat Configs
HARD_DELETE_CHATS: ""

View File

@@ -27,15 +27,23 @@ spec:
app: indexing-model-server
spec:
containers:
- name: indexing-model-server
image: danswer/danswer-model-server:latest
imagePullPolicy: IfNotPresent
command: [ "uvicorn", "model_server.main:app", "--host", "0.0.0.0", "--port", "9000" ]
ports:
- containerPort: 9000
envFrom:
- configMapRef:
name: env-configmap
env:
- name: INDEXING_ONLY
value: "True"
- name: indexing-model-server
image: onyxdotapp/onyx-model-server:latest
imagePullPolicy: IfNotPresent
command:
[
"uvicorn",
"model_server.main:app",
"--host",
"0.0.0.0",
"--port",
"9000",
]
ports:
- containerPort: 9000
envFrom:
- configMapRef:
name: env-configmap
env:
- name: INDEXING_ONLY
value: "True"

View File

@@ -27,12 +27,20 @@ spec:
app: inference-model-server
spec:
containers:
- name: inference-model-server
image: danswer/danswer-model-server:latest
imagePullPolicy: IfNotPresent
command: [ "uvicorn", "model_server.main:app", "--host", "0.0.0.0", "--port", "9000" ]
ports:
- containerPort: 9000
envFrom:
- configMapRef:
name: env-configmap
- name: inference-model-server
image: onyxdotapp/onyx-model-server:latest
imagePullPolicy: IfNotPresent
command:
[
"uvicorn",
"model_server.main:app",
"--host",
"0.0.0.0",
"--port",
"9000",
]
ports:
- containerPort: 9000
envFrom:
- configMapRef:
name: env-configmap

View File

@@ -10,7 +10,7 @@ spec:
protocol: TCP
port: 80
targetPort: 80
- name: danswer
- name: onyx
protocol: TCP
port: 3000
targetPort: 80
@@ -31,25 +31,25 @@ spec:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.23.4-alpine
ports:
- containerPort: 80
env:
- name: DOMAIN
valueFrom:
configMapKeyRef:
name: env-configmap
key: DOMAIN
volumeMounts:
- name: nginx-conf
mountPath: /etc/nginx/conf.d
command:
- /bin/sh
- -c
- |
while :; do sleep 6h & wait $$!; nginx -s reload; done & nginx -g "daemon off;"
- name: nginx
image: nginx:1.23.4-alpine
ports:
- containerPort: 80
env:
- name: DOMAIN
valueFrom:
configMapKeyRef:
name: env-configmap
key: DOMAIN
volumeMounts:
- name: nginx-conf
mountPath: /etc/nginx/conf.d
command:
- /bin/sh
- -c
- |
while :; do sleep 6h & wait $$!; nginx -s reload; done & nginx -g "daemon off;"
volumes:
- name: nginx-conf
configMap:
name: nginx-configmap
- name: nginx-conf
configMap:
name: nginx-configmap

View File

@@ -27,32 +27,32 @@ spec:
app: relational-db
spec:
containers:
- name: relational-db
image: postgres:15.2-alpine
env:
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: danswer-secrets
key: postgres_user
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: danswer-secrets
key: postgres_password
args: ["-c", "max_connections=250"]
ports:
- containerPort: 5432
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: db-storage
subPath: postgres
- name: relational-db
image: postgres:15.2-alpine
env:
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: onyx-secrets
key: postgres_user
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: onyx-secrets
key: postgres_password
args: ["-c", "max_connections=250"]
ports:
- containerPort: 5432
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: db-storage
subPath: postgres
volumeClaimTemplates:
- metadata:
name: db-storage
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
# Adjust the storage request size as needed.
storage: 10Gi
- metadata:
name: db-storage
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
# Adjust the storage request size as needed.
storage: 10Gi

View File

@@ -27,22 +27,25 @@ spec:
app: redis
spec:
containers:
- name: redis
image: redis:7.4-alpine
ports:
- containerPort: 6379
env:
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: danswer-secrets
key: redis_password
command: ["redis-server"]
args:
# save and appendonly are not strictly necessary because kubernetes doesn't mount
# /data silently like docker, but add the save and appendonly for consistency
[
"--requirepass", "$(REDIS_PASSWORD)",
"--save", "",
"--appendonly", "no"
]
- name: redis
image: redis:7.4-alpine
ports:
- containerPort: 6379
env:
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: onyx-secrets
key: redis_password
command: ["redis-server"]
args:
# save and appendonly are not strictly necessary because kubernetes doesn't mount
# /data silently like docker, but add the save and appendonly for consistency
[
"--requirepass",
"$(REDIS_PASSWORD)",
"--save",
"",
"--appendonly",
"no",
]

View File

@@ -16,9 +16,9 @@ spec:
spec:
containers:
- name: slack-bot
image: danswer/danswer-backend:latest
image: onyxdotapp/onyx-backend:latest
imagePullPolicy: IfNotPresent
command: ["python", "danswer/danswerbot/slack/listener.py"]
command: ["python", "onyxdotapp/onyxbot/slack/listener.py"]
ports:
- containerPort: 8000
resources:

View File

@@ -26,19 +26,19 @@ spec:
app: web-server
spec:
containers:
- name: web-server
image: danswer/danswer-web-server:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3000
# There are some extra values since this is shared between services
# There are no conflicts though, extra env variables are simply ignored
env:
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: danswer-secrets
key: redis_password
envFrom:
- configMapRef:
name: env-configmap
- name: web-server
image: onyxdotapp/onyx-web-server:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3000
# There are some extra values since this is shared between services
# There are no conflicts though, extra env variables are simply ignored
env:
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: onyx-secrets
key: redis_password
envFrom:
- configMapRef:
name: env-configmap