Skip to content

Commit 89ed845

Browse files
committed
merge upstream/dev into improve-ux-connectors
Resolve 3 conflicts: - connector-popup.tsx: keep Picker modal coordination (pickerOpen state) - google-drive-config.tsx: keep Google Picker, discard upstream folder tree - composio-drive-config.tsx: accept upstream collapsible folder tree UX
2 parents cf8f70d + 8f1544c commit 89ed845

File tree

108 files changed

+2264
-1799
lines changed

Some content is hidden

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

108 files changed

+2264
-1799
lines changed

.dockerignore

Lines changed: 0 additions & 97 deletions
This file was deleted.
Lines changed: 76 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ permissions:
2626
jobs:
2727
tag_release:
2828
runs-on: ubuntu-latest
29+
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || github.event_name == 'workflow_dispatch'
2930
outputs:
3031
new_tag: ${{ steps.tag_version.outputs.next_version }}
3132
steps:
@@ -86,6 +87,7 @@ jobs:
8687
8788
build:
8889
needs: tag_release
90+
if: always() && (needs.tag_release.result == 'success' || needs.tag_release.result == 'skipped')
8991
runs-on: ${{ matrix.os }}
9092
permissions:
9193
packages: write
@@ -121,6 +123,12 @@ jobs:
121123
id: image
122124
run: echo "name=${REGISTRY_IMAGE,,}" >> $GITHUB_OUTPUT
123125

126+
- name: Docker meta
127+
id: meta
128+
uses: docker/metadata-action@v5
129+
with:
130+
images: ${{ steps.image.outputs.name }}
131+
124132
- name: Login to GitHub Container Registry
125133
uses: docker/login-action@v3
126134
with:
@@ -139,14 +147,15 @@ jobs:
139147
sudo rm -rf "$AGENT_TOOLSDIRECTORY" || true
140148
docker system prune -af
141149
142-
- name: Build and push ${{ matrix.name }} (${{ matrix.suffix }})
150+
- name: Build and push by digest ${{ matrix.name }} (${{ matrix.suffix }})
143151
id: build
144152
uses: docker/build-push-action@v6
145153
with:
146154
context: ${{ matrix.context }}
147155
file: ${{ matrix.file }}
148-
push: true
149-
tags: ${{ steps.image.outputs.name }}:${{ needs.tag_release.outputs.new_tag }}-${{ matrix.suffix }}
156+
labels: ${{ steps.meta.outputs.labels }}
157+
tags: ${{ steps.image.outputs.name }}
158+
outputs: type=image,push-by-digest=true,name-canonical=true,push=true
150159
platforms: ${{ matrix.platform }}
151160
cache-from: type=gha,scope=${{ matrix.image }}-${{ matrix.suffix }}
152161
cache-to: type=gha,mode=max,scope=${{ matrix.image }}-${{ matrix.suffix }}
@@ -159,9 +168,24 @@ jobs:
159168
${{ matrix.image == 'web' && 'NEXT_PUBLIC_ELECTRIC_AUTH_MODE=__NEXT_PUBLIC_ELECTRIC_AUTH_MODE__' || '' }}
160169
${{ matrix.image == 'web' && 'NEXT_PUBLIC_DEPLOYMENT_MODE=__NEXT_PUBLIC_DEPLOYMENT_MODE__' || '' }}
161170
171+
- name: Export digest
172+
run: |
173+
mkdir -p /tmp/digests
174+
digest="${{ steps.build.outputs.digest }}"
175+
touch "/tmp/digests/${digest#sha256:}"
176+
177+
- name: Upload digest
178+
uses: actions/upload-artifact@v4
179+
with:
180+
name: digests-${{ matrix.image }}-${{ matrix.suffix }}
181+
path: /tmp/digests/*
182+
if-no-files-found: error
183+
retention-days: 1
184+
162185
create_manifest:
163186
runs-on: ubuntu-latest
164187
needs: [tag_release, build]
188+
if: always() && needs.build.result == 'success'
165189
permissions:
166190
packages: write
167191
contents: read
@@ -170,7 +194,9 @@ jobs:
170194
matrix:
171195
include:
172196
- name: surfsense-backend
197+
image: backend
173198
- name: surfsense-web
199+
image: web
174200
env:
175201
REGISTRY_IMAGE: ghcr.io/${{ github.repository_owner }}/${{ matrix.name }}
176202

@@ -179,42 +205,63 @@ jobs:
179205
id: image
180206
run: echo "name=${REGISTRY_IMAGE,,}" >> $GITHUB_OUTPUT
181207

208+
- name: Download amd64 digest
209+
uses: actions/download-artifact@v4
210+
with:
211+
name: digests-${{ matrix.image }}-amd64
212+
path: /tmp/digests
213+
214+
- name: Download arm64 digest
215+
uses: actions/download-artifact@v4
216+
with:
217+
name: digests-${{ matrix.image }}-arm64
218+
path: /tmp/digests
219+
220+
- name: Set up Docker Buildx
221+
uses: docker/setup-buildx-action@v3
222+
182223
- name: Login to GitHub Container Registry
183224
uses: docker/login-action@v3
184225
with:
185226
registry: ghcr.io
186227
username: ${{ github.repository_owner }}
187228
password: ${{ secrets.GITHUB_TOKEN }}
188229

189-
- name: Create and push multi-arch manifest
230+
- name: Compute app version
231+
id: appver
190232
run: |
191233
VERSION_TAG="${{ needs.tag_release.outputs.new_tag }}"
192-
IMAGE="${{ steps.image.outputs.name }}"
193-
APP_VERSION=$(echo "$VERSION_TAG" | rev | cut -d. -f2- | rev)
194-
195-
docker manifest create ${IMAGE}:${VERSION_TAG} \
196-
${IMAGE}:${VERSION_TAG}-amd64 \
197-
${IMAGE}:${VERSION_TAG}-arm64
198-
199-
docker manifest push ${IMAGE}:${VERSION_TAG}
200-
201-
if [[ "${{ github.ref }}" == "refs/heads/${{ github.event.repository.default_branch }}" ]] || [[ "${{ github.event.inputs.branch }}" == "${{ github.event.repository.default_branch }}" ]]; then
202-
docker manifest create ${IMAGE}:${APP_VERSION} \
203-
${IMAGE}:${VERSION_TAG}-amd64 \
204-
${IMAGE}:${VERSION_TAG}-arm64
205-
206-
docker manifest push ${IMAGE}:${APP_VERSION}
207-
208-
docker manifest create ${IMAGE}:latest \
209-
${IMAGE}:${VERSION_TAG}-amd64 \
210-
${IMAGE}:${VERSION_TAG}-arm64
211-
212-
docker manifest push ${IMAGE}:latest
234+
if [ -n "$VERSION_TAG" ]; then
235+
APP_VERSION=$(echo "$VERSION_TAG" | rev | cut -d. -f2- | rev)
236+
else
237+
APP_VERSION=""
213238
fi
239+
echo "app_version=$APP_VERSION" >> $GITHUB_OUTPUT
214240
215-
- name: Summary
241+
- name: Docker meta
242+
id: meta
243+
uses: docker/metadata-action@v5
244+
with:
245+
images: ${{ steps.image.outputs.name }}
246+
tags: |
247+
type=raw,value=${{ needs.tag_release.outputs.new_tag }},enable=${{ needs.tag_release.outputs.new_tag != '' }}
248+
type=raw,value=${{ steps.appver.outputs.app_version }},enable=${{ needs.tag_release.outputs.new_tag != '' && (github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || github.event.inputs.branch == github.event.repository.default_branch) }}
249+
type=ref,event=branch
250+
type=sha,prefix=git-
251+
flavor: |
252+
latest=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || github.event.inputs.branch == github.event.repository.default_branch }}
253+
254+
- name: Create manifest list and push
255+
working-directory: /tmp/digests
216256
run: |
257+
docker buildx imagetools create \
258+
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
259+
$(printf '${{ steps.image.outputs.name }}@sha256:%s ' *)
260+
- name: Inspect image
261+
run: |
262+
docker buildx imagetools inspect ${{ steps.image.outputs.name }}:${{ steps.meta.outputs.version }}
263+
264+
- name: Summary
265+
run: |
217266
echo "Multi-arch manifest created for ${{ matrix.name }}!"
218-
echo "Versioned: ${{ steps.image.outputs.name }}:${{ needs.tag_release.outputs.new_tag }}"
219-
echo "App version: ${{ steps.image.outputs.name }}:$(echo '${{ needs.tag_release.outputs.new_tag }}' | rev | cut -d. -f2- | rev)"
220-
echo "Latest: ${{ steps.image.outputs.name }}:latest"
267+
echo "Tags: $(jq -cr '.tags | join(", ")' <<< "$DOCKER_METADATA_OUTPUT_JSON")"

docker/.env.example

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2
3333
# Ports (change to avoid conflicts with other services on your machine)
3434
# ------------------------------------------------------------------------------
3535

36-
# BACKEND_PORT=8000
37-
# FRONTEND_PORT=3000
38-
# ELECTRIC_PORT=5133
36+
# BACKEND_PORT=8929
37+
# FRONTEND_PORT=3929
38+
# ELECTRIC_PORT=5929
3939
# FLOWER_PORT=5555
4040

4141
# ==============================================================================

docker/docker-compose.dev.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# For production with prebuilt images, use docker/docker-compose.yml instead.
99
# =============================================================================
1010

11-
name: surfsense
11+
name: surfsense-dev
1212

1313
services:
1414
db:
@@ -162,8 +162,9 @@ services:
162162
image: electricsql/electric:1.4.10
163163
ports:
164164
- "${ELECTRIC_PORT:-5133}:3000"
165-
# depends_on:
166-
# - db
165+
depends_on:
166+
db:
167+
condition: service_healthy
167168
environment:
168169
- DATABASE_URL=${ELECTRIC_DATABASE_URL:-postgresql://${ELECTRIC_DB_USER:-electric}:${ELECTRIC_DB_PASSWORD:-electric_password}@${DB_HOST:-db}:${DB_PORT:-5432}/${DB_NAME:-surfsense}?sslmode=${DB_SSLMODE:-disable}}
169170
- ELECTRIC_INSECURE=true
@@ -197,10 +198,10 @@ services:
197198

198199
volumes:
199200
postgres_data:
200-
name: surfsense-postgres
201+
name: surfsense-dev-postgres
201202
pgadmin_data:
202-
name: surfsense-pgadmin
203+
name: surfsense-dev-pgadmin
203204
redis_data:
204-
name: surfsense-redis
205+
name: surfsense-dev-redis
205206
shared_temp:
206-
name: surfsense-shared-temp
207+
name: surfsense-dev-shared-temp

docker/docker-compose.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ services:
4545
backend:
4646
image: ghcr.io/modsetter/surfsense-backend:${SURFSENSE_VERSION:-latest}
4747
ports:
48-
- "${BACKEND_PORT:-8000}:8000"
48+
- "${BACKEND_PORT:-8929}:8000"
4949
volumes:
5050
- shared_temp:/shared_tmp
5151
env_file:
@@ -61,7 +61,7 @@ services:
6161
UNSTRUCTURED_HAS_PATCHED_LOOP: "1"
6262
ELECTRIC_DB_USER: ${ELECTRIC_DB_USER:-electric}
6363
ELECTRIC_DB_PASSWORD: ${ELECTRIC_DB_PASSWORD:-electric_password}
64-
NEXT_FRONTEND_URL: ${NEXT_FRONTEND_URL:-http://localhost:${FRONTEND_PORT:-3000}}
64+
NEXT_FRONTEND_URL: ${NEXT_FRONTEND_URL:-http://localhost:${FRONTEND_PORT:-3929}}
6565
# Daytona Sandbox – uncomment and set credentials to enable cloud code execution
6666
# DAYTONA_SANDBOX_ENABLED: "TRUE"
6767
# DAYTONA_API_KEY: ${DAYTONA_API_KEY:-}
@@ -151,7 +151,7 @@ services:
151151
electric:
152152
image: electricsql/electric:1.4.10
153153
ports:
154-
- "${ELECTRIC_PORT:-5133}:3000"
154+
- "${ELECTRIC_PORT:-5929}:3000"
155155
environment:
156156
DATABASE_URL: ${ELECTRIC_DATABASE_URL:-postgresql://${ELECTRIC_DB_USER:-electric}:${ELECTRIC_DB_PASSWORD:-electric_password}@${DB_HOST:-db}:${DB_PORT:-5432}/${DB_NAME:-surfsense}?sslmode=${DB_SSLMODE:-disable}}
157157
ELECTRIC_INSECURE: "true"
@@ -169,10 +169,10 @@ services:
169169
frontend:
170170
image: ghcr.io/modsetter/surfsense-web:${SURFSENSE_VERSION:-latest}
171171
ports:
172-
- "${FRONTEND_PORT:-3000}:3000"
172+
- "${FRONTEND_PORT:-3929}:3000"
173173
environment:
174-
NEXT_PUBLIC_FASTAPI_BACKEND_URL: ${NEXT_PUBLIC_FASTAPI_BACKEND_URL:-http://localhost:${BACKEND_PORT:-8000}}
175-
NEXT_PUBLIC_ELECTRIC_URL: ${NEXT_PUBLIC_ELECTRIC_URL:-http://localhost:${ELECTRIC_PORT:-5133}}
174+
NEXT_PUBLIC_FASTAPI_BACKEND_URL: ${NEXT_PUBLIC_FASTAPI_BACKEND_URL:-http://localhost:${BACKEND_PORT:-8929}}
175+
NEXT_PUBLIC_ELECTRIC_URL: ${NEXT_PUBLIC_ELECTRIC_URL:-http://localhost:${ELECTRIC_PORT:-5929}}
176176
NEXT_PUBLIC_FASTAPI_BACKEND_AUTH_TYPE: ${AUTH_TYPE:-LOCAL}
177177
NEXT_PUBLIC_ETL_SERVICE: ${ETL_SERVICE:-DOCLING}
178178
NEXT_PUBLIC_DEPLOYMENT_MODE: ${DEPLOYMENT_MODE:-self-hosted}

docker/scripts/install.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,9 @@ Write-Host " OSS Alternative to NotebookLM for Teams [$versionDisplay]"
321321
Write-Host ("=" * 62) -ForegroundColor Cyan
322322
Write-Host ""
323323

324-
Write-Info " Frontend: http://localhost:3000"
325-
Write-Info " Backend: http://localhost:8000"
326-
Write-Info " API Docs: http://localhost:8000/docs"
324+
Write-Info " Frontend: http://localhost:3929"
325+
Write-Info " Backend: http://localhost:8929"
326+
Write-Info " API Docs: http://localhost:8929/docs"
327327
Write-Info ""
328328
Write-Info " Config: $InstallDir\.env"
329329
Write-Info " Logs: cd $InstallDir; docker compose logs -f"

docker/scripts/install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,9 @@ _version_display="${_version_display:-latest}"
304304
printf " OSS Alternative to NotebookLM for Teams ${YELLOW}[%s]${NC}\n" "${_version_display}"
305305
printf "${CYAN}══════════════════════════════════════════════════════════════${NC}\n\n"
306306

307-
info " Frontend: http://localhost:3000"
308-
info " Backend: http://localhost:8000"
309-
info " API Docs: http://localhost:8000/docs"
307+
info " Frontend: http://localhost:3929"
308+
info " Backend: http://localhost:8929"
309+
info " API Docs: http://localhost:8929/docs"
310310
info ""
311311
info " Config: ${INSTALL_DIR}/.env"
312312
info " Logs: cd ${INSTALL_DIR} && ${DC} logs -f"

0 commit comments

Comments
 (0)