Skip to content

Commit 90b60b6

Browse files
committed
sync with danswer-ai
2 parents f4eeed6 + 4d63cb6 commit 90b60b6

425 files changed

Lines changed: 13590 additions & 9800 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docker-build-push-backend-container-on-tag.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- "*"
77

88
env:
9-
REGISTRY_IMAGE: ${{ contains(github.ref_name, 'cloud') && 'danswer/danswer-backend-cloud' || 'danswer/danswer-backend' }}
9+
REGISTRY_IMAGE: ${{ contains(github.ref_name, 'cloud') && 'onyxdotapp/onyx-backend-cloud' || 'onyxdotapp/onyx-backend' }}
1010
LATEST_TAG: ${{ contains(github.ref_name, 'latest') }}
1111

1212
jobs:
@@ -44,7 +44,7 @@ jobs:
4444
${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}
4545
${{ env.LATEST_TAG == 'true' && format('{0}:latest', env.REGISTRY_IMAGE) || '' }}
4646
build-args: |
47-
DANSWER_VERSION=${{ github.ref_name }}
47+
ONYX_VERSION=${{ github.ref_name }}
4848
4949
# trivy has their own rate limiting issues causing this action to flake
5050
# we worked around it by hardcoding to different db repos in env
@@ -57,7 +57,7 @@ jobs:
5757
TRIVY_DB_REPOSITORY: "public.ecr.aws/aquasecurity/trivy-db:2"
5858
TRIVY_JAVA_DB_REPOSITORY: "public.ecr.aws/aquasecurity/trivy-java-db:1"
5959
with:
60-
# To run locally: trivy image --severity HIGH,CRITICAL danswer/danswer-backend
60+
# To run locally: trivy image --severity HIGH,CRITICAL onyxdotapp/onyx-backend
6161
image-ref: docker.io/${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}
6262
severity: "CRITICAL,HIGH"
6363
trivyignores: ./backend/.trivyignore

.github/workflows/docker-build-push-cloud-web-container-on-tag.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- "*"
88

99
env:
10-
REGISTRY_IMAGE: danswer/danswer-web-server-cloud
10+
REGISTRY_IMAGE: onyxdotapp/onyx-web-server-cloud
1111
LATEST_TAG: ${{ contains(github.ref_name, 'latest') }}
1212

1313
jobs:
@@ -60,7 +60,7 @@ jobs:
6060
platforms: ${{ matrix.platform }}
6161
push: true
6262
build-args: |
63-
DANSWER_VERSION=${{ github.ref_name }}
63+
ONYX_VERSION=${{ github.ref_name }}
6464
NEXT_PUBLIC_CLOUD_ENABLED=true
6565
NEXT_PUBLIC_POSTHOG_KEY=${{ secrets.POSTHOG_KEY }}
6666
NEXT_PUBLIC_POSTHOG_HOST=${{ secrets.POSTHOG_HOST }}

.github/workflows/docker-build-push-model-server-container-on-tag.yml

Lines changed: 83 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,50 +6,118 @@ on:
66
- "*"
77

88
env:
9-
REGISTRY_IMAGE: ${{ contains(github.ref_name, 'cloud') && 'danswer/danswer-model-server-cloud' || 'danswer/danswer-model-server' }}
9+
REGISTRY_IMAGE: ${{ contains(github.ref_name, 'cloud') && 'onyxdotapp/onyx-model-server-cloud' || 'onyxdotapp/onyx-model-server' }}
1010
LATEST_TAG: ${{ contains(github.ref_name, 'latest') }}
11+
DOCKER_BUILDKIT: 1
12+
BUILDKIT_PROGRESS: plain
1113

1214
jobs:
13-
build-and-push:
14-
# See https://runs-on.com/runners/linux/
15-
runs-on: [runs-on, runner=8cpu-linux-x64, "run-id=${{ github.run_id }}"]
15+
build-amd64:
16+
runs-on:
17+
[runs-on, runner=8cpu-linux-x64, "run-id=${{ github.run_id }}-amd64"]
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: System Info
23+
run: |
24+
df -h
25+
free -h
26+
docker system prune -af --volumes
27+
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v3
30+
with:
31+
driver-opts: |
32+
image=moby/buildkit:latest
33+
network=host
34+
35+
- name: Login to Docker Hub
36+
uses: docker/login-action@v3
37+
with:
38+
username: ${{ secrets.DOCKER_USERNAME }}
39+
password: ${{ secrets.DOCKER_TOKEN }}
40+
41+
- name: Build and Push AMD64
42+
uses: docker/build-push-action@v5
43+
with:
44+
context: ./backend
45+
file: ./backend/Dockerfile.model_server
46+
platforms: linux/amd64
47+
push: true
48+
tags: ${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}-amd64
49+
build-args: |
50+
DANSWER_VERSION=${{ github.ref_name }}
51+
outputs: type=registry
52+
provenance: false
1653

54+
build-arm64:
55+
runs-on:
56+
[runs-on, runner=8cpu-linux-x64, "run-id=${{ github.run_id }}-arm64"]
1757
steps:
1858
- name: Checkout code
1959
uses: actions/checkout@v4
2060

61+
- name: System Info
62+
run: |
63+
df -h
64+
free -h
65+
docker system prune -af --volumes
66+
2167
- name: Set up Docker Buildx
2268
uses: docker/setup-buildx-action@v3
69+
with:
70+
driver-opts: |
71+
image=moby/buildkit:latest
72+
network=host
2373
2474
- name: Login to Docker Hub
2575
uses: docker/login-action@v3
2676
with:
2777
username: ${{ secrets.DOCKER_USERNAME }}
2878
password: ${{ secrets.DOCKER_TOKEN }}
2979

30-
- name: Model Server Image Docker Build and Push
80+
- name: Build and Push ARM64
3181
uses: docker/build-push-action@v5
3282
with:
3383
context: ./backend
3484
file: ./backend/Dockerfile.model_server
35-
platforms: linux/amd64,linux/arm64
85+
platforms: linux/arm64
3686
push: true
37-
tags: |
38-
${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}
39-
${{ env.LATEST_TAG == 'true' && format('{0}:latest', env.REGISTRY_IMAGE) || '' }}
87+
tags: ${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}-arm64
4088
build-args: |
4189
DANSWER_VERSION=${{ github.ref_name }}
90+
outputs: type=registry
91+
provenance: false
92+
93+
merge-and-scan:
94+
needs: [build-amd64, build-arm64]
95+
runs-on: ubuntu-latest
96+
steps:
97+
- name: Login to Docker Hub
98+
uses: docker/login-action@v3
99+
with:
100+
username: ${{ secrets.DOCKER_USERNAME }}
101+
password: ${{ secrets.DOCKER_TOKEN }}
102+
103+
- name: Create and Push Multi-arch Manifest
104+
run: |
105+
docker buildx create --use
106+
docker buildx imagetools create -t ${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }} \
107+
${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}-amd64 \
108+
${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}-arm64
109+
if [[ "${{ env.LATEST_TAG }}" == "true" ]]; then
110+
docker buildx imagetools create -t ${{ env.REGISTRY_IMAGE }}:latest \
111+
${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}-amd64 \
112+
${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}-arm64
113+
fi
42114
43-
# trivy has their own rate limiting issues causing this action to flake
44-
# we worked around it by hardcoding to different db repos in env
45-
# can re-enable when they figure it out
46-
# https://github.com/aquasecurity/trivy/discussions/7538
47-
# https://github.com/aquasecurity/trivy-action/issues/389
48115
- name: Run Trivy vulnerability scanner
49116
uses: aquasecurity/trivy-action@master
50117
env:
51118
TRIVY_DB_REPOSITORY: "public.ecr.aws/aquasecurity/trivy-db:2"
52119
TRIVY_JAVA_DB_REPOSITORY: "public.ecr.aws/aquasecurity/trivy-java-db:1"
53120
with:
54-
image-ref: docker.io/danswer/danswer-model-server:${{ github.ref_name }}
121+
image-ref: docker.io/onyxdotapp/onyx-model-server:${{ github.ref_name }}
55122
severity: "CRITICAL,HIGH"
123+
timeout: "10m"

.github/workflows/docker-build-push-web-container-on-tag.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ name: Build and Push Web Image on Tag
33
on:
44
push:
55
tags:
6-
- '*'
6+
- "*"
77

88
env:
9-
REGISTRY_IMAGE: danswer/danswer-web-server
9+
REGISTRY_IMAGE: onyxdotapp/onyx-web-server
1010
LATEST_TAG: ${{ contains(github.ref_name, 'latest') }}
11-
11+
1212
jobs:
1313
build:
1414
runs-on:
@@ -27,11 +27,11 @@ jobs:
2727
- name: Prepare
2828
run: |
2929
platform=${{ matrix.platform }}
30-
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
31-
30+
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
31+
3232
- name: Checkout
3333
uses: actions/checkout@v4
34-
34+
3535
- name: Docker meta
3636
id: meta
3737
uses: docker/metadata-action@v5
@@ -40,16 +40,16 @@ jobs:
4040
tags: |
4141
type=raw,value=${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}
4242
type=raw,value=${{ env.LATEST_TAG == 'true' && format('{0}:latest', env.REGISTRY_IMAGE) || '' }}
43-
43+
4444
- name: Set up Docker Buildx
4545
uses: docker/setup-buildx-action@v3
46-
46+
4747
- name: Login to Docker Hub
4848
uses: docker/login-action@v3
4949
with:
5050
username: ${{ secrets.DOCKER_USERNAME }}
5151
password: ${{ secrets.DOCKER_TOKEN }}
52-
52+
5353
- name: Build and push by digest
5454
id: build
5555
uses: docker/build-push-action@v5
@@ -59,18 +59,18 @@ jobs:
5959
platforms: ${{ matrix.platform }}
6060
push: true
6161
build-args: |
62-
DANSWER_VERSION=${{ github.ref_name }}
63-
# needed due to weird interactions with the builds for different platforms
62+
ONYX_VERSION=${{ github.ref_name }}
63+
# needed due to weird interactions with the builds for different platforms
6464
no-cache: true
6565
labels: ${{ steps.meta.outputs.labels }}
6666
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
67-
67+
6868
- name: Export digest
6969
run: |
7070
mkdir -p /tmp/digests
7171
digest="${{ steps.build.outputs.digest }}"
72-
touch "/tmp/digests/${digest#sha256:}"
73-
72+
touch "/tmp/digests/${digest#sha256:}"
73+
7474
- name: Upload digest
7575
uses: actions/upload-artifact@v4
7676
with:
@@ -90,42 +90,42 @@ jobs:
9090
path: /tmp/digests
9191
pattern: digests-*
9292
merge-multiple: true
93-
93+
9494
- name: Set up Docker Buildx
9595
uses: docker/setup-buildx-action@v3
96-
96+
9797
- name: Docker meta
9898
id: meta
9999
uses: docker/metadata-action@v5
100100
with:
101101
images: ${{ env.REGISTRY_IMAGE }}
102-
102+
103103
- name: Login to Docker Hub
104104
uses: docker/login-action@v3
105105
with:
106106
username: ${{ secrets.DOCKER_USERNAME }}
107107
password: ${{ secrets.DOCKER_TOKEN }}
108-
108+
109109
- name: Create manifest list and push
110110
working-directory: /tmp/digests
111111
run: |
112112
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
113-
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
114-
113+
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
114+
115115
- name: Inspect image
116116
run: |
117117
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
118118
119-
# trivy has their own rate limiting issues causing this action to flake
120-
# we worked around it by hardcoding to different db repos in env
121-
# can re-enable when they figure it out
122-
# https://github.com/aquasecurity/trivy/discussions/7538
123-
# https://github.com/aquasecurity/trivy-action/issues/389
119+
# trivy has their own rate limiting issues causing this action to flake
120+
# we worked around it by hardcoding to different db repos in env
121+
# can re-enable when they figure it out
122+
# https://github.com/aquasecurity/trivy/discussions/7538
123+
# https://github.com/aquasecurity/trivy-action/issues/389
124124
- name: Run Trivy vulnerability scanner
125125
uses: aquasecurity/trivy-action@master
126126
env:
127-
TRIVY_DB_REPOSITORY: 'public.ecr.aws/aquasecurity/trivy-db:2'
128-
TRIVY_JAVA_DB_REPOSITORY: 'public.ecr.aws/aquasecurity/trivy-java-db:1'
127+
TRIVY_DB_REPOSITORY: "public.ecr.aws/aquasecurity/trivy-db:2"
128+
TRIVY_JAVA_DB_REPOSITORY: "public.ecr.aws/aquasecurity/trivy-java-db:1"
129129
with:
130130
image-ref: docker.io/${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}
131-
severity: 'CRITICAL,HIGH'
131+
severity: "CRITICAL,HIGH"

.github/workflows/docker-tag-latest.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,31 @@ on:
77
workflow_dispatch:
88
inputs:
99
version:
10-
description: 'The version (ie v0.0.1) to tag as latest'
10+
description: "The version (ie v0.0.1) to tag as latest"
1111
required: true
1212

1313
jobs:
1414
tag:
1515
# See https://runs-on.com/runners/linux/
1616
# use a lower powered instance since this just does i/o to docker hub
17-
runs-on: [runs-on,runner=2cpu-linux-x64,"run-id=${{ github.run_id }}"]
17+
runs-on: [runs-on, runner=2cpu-linux-x64, "run-id=${{ github.run_id }}"]
1818
steps:
19-
- name: Set up Docker Buildx
20-
uses: docker/setup-buildx-action@v1
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v1
2121

22-
- name: Login to Docker Hub
23-
uses: docker/login-action@v1
24-
with:
25-
username: ${{ secrets.DOCKER_USERNAME }}
26-
password: ${{ secrets.DOCKER_TOKEN }}
22+
- name: Login to Docker Hub
23+
uses: docker/login-action@v1
24+
with:
25+
username: ${{ secrets.DOCKER_USERNAME }}
26+
password: ${{ secrets.DOCKER_TOKEN }}
2727

28-
- name: Enable Docker CLI experimental features
29-
run: echo "DOCKER_CLI_EXPERIMENTAL=enabled" >> $GITHUB_ENV
28+
- name: Enable Docker CLI experimental features
29+
run: echo "DOCKER_CLI_EXPERIMENTAL=enabled" >> $GITHUB_ENV
3030

31-
- name: Pull, Tag and Push Web Server Image
32-
run: |
33-
docker buildx imagetools create -t danswer/danswer-web-server:latest danswer/danswer-web-server:${{ github.event.inputs.version }}
31+
- name: Pull, Tag and Push Web Server Image
32+
run: |
33+
docker buildx imagetools create -t onyxdotapp/onyx-web-server:latest onyxdotapp/onyx-web-server:${{ github.event.inputs.version }}
3434
35-
- name: Pull, Tag and Push API Server Image
36-
run: |
37-
docker buildx imagetools create -t danswer/danswer-backend:latest danswer/danswer-backend:${{ github.event.inputs.version }}
35+
- name: Pull, Tag and Push API Server Image
36+
run: |
37+
docker buildx imagetools create -t onyxdotapp/onyx-backend:latest onyxdotapp/onyx-backend:${{ github.event.inputs.version }}

0 commit comments

Comments
 (0)