From a4f3af7ed8474751ce623c49f7a2e8c283be88b8 Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Tue, 2 Jun 2026 16:10:50 +0200 Subject: [PATCH] chore(dev): document storage env vars and add azurite service --- docker/docker-compose.deps-only.yml | 19 +++++++++++++++++++ surfsense_backend/.env.example | 10 ++++++++++ 2 files changed, 29 insertions(+) diff --git a/docker/docker-compose.deps-only.yml b/docker/docker-compose.deps-only.yml index 2be0bfe6e..528f6df0b 100644 --- a/docker/docker-compose.deps-only.yml +++ b/docker/docker-compose.deps-only.yml @@ -128,6 +128,23 @@ services: timeout: 5s retries: 5 + # OPTIONAL — Azurite emulates Azure Blob Storage for testing the Azure + # original-file backend. The default filesystem backend needs none of this. + # To exercise it, set in surfsense_backend/.env: + # FILE_STORAGE_BACKEND=azure + # AZURE_STORAGE_CONTAINER=surfsense-documents + # AZURE_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://localhost:${AZURITE_BLOB_PORT:-10000}/devstoreaccount1; + # The backend creates blobs on upload; create the container once first + # (Azure CLI / Storage Explorer), then upload a document. + azurite: + image: mcr.microsoft.com/azure-storage/azurite:3.33.0 + command: azurite-blob --blobHost 0.0.0.0 --blobPort 10000 + ports: + - "${AZURITE_BLOB_PORT:-10000}:10000" + volumes: + - azurite_data:/data + restart: unless-stopped + volumes: postgres_data: name: surfsense-deps-postgres @@ -137,3 +154,5 @@ volumes: name: surfsense-deps-redis zero_cache_data: name: surfsense-deps-zero-cache + azurite_data: + name: surfsense-deps-azurite diff --git a/surfsense_backend/.env.example b/surfsense_backend/.env.example index 79ba715ce..907a48ea2 100644 --- a/surfsense_backend/.env.example +++ b/surfsense_backend/.env.example @@ -293,6 +293,16 @@ LLAMA_CLOUD_API_KEY=llx-nnn # AZURE_DI_ENDPOINT=https://your-resource.cognitiveservices.azure.com/ # AZURE_DI_KEY=your-key +# Original File Storage +# Where to persist the original bytes of uploaded documents (for download today, +# redaction / form-filling later). "local" needs no cloud creds and is the dev default. +FILE_STORAGE_BACKEND=local +# Local backend: directory for stored files (defaults to surfsense_backend/.local_object_store) +# FILE_STORAGE_LOCAL_PATH=/var/lib/surfsense/object-store +# Azure Blob backend (set FILE_STORAGE_BACKEND=azure): +# AZURE_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...;EndpointSuffix=core.windows.net +# AZURE_STORAGE_CONTAINER=surfsense-documents + # Daytona Sandbox (isolated code execution) # DAYTONA_SANDBOX_ENABLED=FALSE # DAYTONA_API_KEY=your-daytona-api-key