Initial commit — Drive, an S3 file browser with WOPI editing
Lightweight replacement for the upstream La Suite Numérique drive (Django/Celery/Next.js) built as a single Deno binary. Server (Deno + Hono): - S3 file operations via AWS SigV4 (no SDK) with pre-signed URLs - WOPI host for Collabora Online (CheckFileInfo, GetFile, PutFile, locks) - Ory Kratos session auth + CSRF protection - Ory Keto permission model (OPL namespaces, not yet wired to routes) - PostgreSQL metadata with recursive folder sizes - S3 backfill API for registering files uploaded outside the UI - OpenTelemetry tracing + metrics (opt-in via OTEL_ENABLED) Frontend (React 19 + Cunningham v4 + react-aria): - File browser with GridList, keyboard nav, multi-select - Collabora editor iframe (full-screen, form POST, postMessage) - Profile menu, waffle menu, drag-drop upload, asset type badges - La Suite integration service theming (runtime CSS) Testing (549 tests): - 235 server unit tests (Deno) — 90%+ coverage - 278 UI unit tests (Vitest) — 90%+ coverage - 11 E2E tests (Playwright) - 12 integration service tests (Playwright) - 13 WOPI integration tests (Playwright + Docker Compose + Collabora) MIT licensed.
This commit is contained in:
60
compose.yaml
Normal file
60
compose.yaml
Normal file
@@ -0,0 +1,60 @@
|
||||
# WOPI integration test stack
|
||||
# Usage: docker compose up -d && deno task test:wopi
|
||||
#
|
||||
# Spins up Collabora, PostgreSQL, and SeaweedFS.
|
||||
# The Drive server runs on the host (not in Docker) so Playwright can reach it.
|
||||
# Collabora needs to reach the host's Drive server for WOPI callbacks —
|
||||
# we use host.docker.internal for that.
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_USER: driver
|
||||
POSTGRES_PASSWORD: driver
|
||||
POSTGRES_DB: driver_db
|
||||
ports:
|
||||
- "5433:5432" # 5433 to avoid conflict with host postgres
|
||||
healthcheck:
|
||||
test: pg_isready -U driver
|
||||
interval: 2s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
seaweedfs:
|
||||
image: chrislusf/seaweedfs:latest
|
||||
command: "server -s3 -dir=/data -master.volumeSizeLimitMB=32"
|
||||
ports:
|
||||
- "8334:8333" # S3 API (8334 to avoid conflict with host weed mini)
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "-O-", "http://localhost:9333/cluster/status"]
|
||||
interval: 3s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
collabora:
|
||||
image: collabora/code:latest
|
||||
ports:
|
||||
- "9980:9980"
|
||||
environment:
|
||||
# Allow WOPI callbacks from the host machine's Drive server
|
||||
aliasgroup1: "http://host\\.docker\\.internal:3200"
|
||||
server_name: "localhost:9980"
|
||||
extra_params: >-
|
||||
--o:ssl.enable=false
|
||||
--o:ssl.termination=false
|
||||
--o:net.proto=IPv4
|
||||
--o:logging.level=warning
|
||||
--o:num_prespawn_children=1
|
||||
--o:per_document.max_concurrency=2
|
||||
username: admin
|
||||
password: admin
|
||||
cap_add:
|
||||
- SYS_CHROOT
|
||||
- SYS_ADMIN
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-sf", "http://localhost:9980/hosting/discovery"]
|
||||
interval: 5s
|
||||
timeout: 10s
|
||||
retries: 30
|
||||
start_period: 30s
|
||||
Reference in New Issue
Block a user