Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ ORIGIN=http://localhost:13002
# shifted api host port, e.g. http://localhost:18000.)
LQ_API_INTERNAL_URL=http://api:8000

# Max request body donna-web accepts (adapter-node BODY_SIZE_LIMIT; its default is
# 512K, which breaks KB uploads >0.5MB). Units K/M/G, or 'Infinity' to disable.
DONNA_WEB_BODY_SIZE_LIMIT=512M

# --- Required backend secrets (no defaults; bring-up FAILS if unset). Dev values OK locally. ---
POSTGRES_DB=lq_ai
POSTGRES_USER=lq_ai
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ services:
environment:
ORIGIN: ${ORIGIN:-http://localhost:3000}
LQ_API_INTERNAL_URL: http://api:8000
# SvelteKit adapter-node defaults to 512K, breaking KB uploads >0.5MB with an opaque 500.
BODY_SIZE_LIMIT: ${DONNA_WEB_BODY_SIZE_LIMIT:-512M}
ports:
- '127.0.0.1:${DONNA_WEB_HOST_PORT:-3000}:3000'
healthcheck:
Expand Down
22 changes: 22 additions & 0 deletions src/lib/server/releaseCompose.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// @vitest-environment node
import { describe, it, expect } from 'vitest';
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';

// docker-compose.release.yml is a hand-maintained mirror (see its header comment)
// with no other test surface; these guards pin deploy-critical donna-web env so a
// re-sync against vendor/lq-ai cannot silently drop it. Vitest runs from the repo
// root, so process.cwd() resolves the top-level deploy files.
const read = (rel: string) => readFileSync(resolve(process.cwd(), rel), 'utf8');

describe('docker-compose.release.yml donna-web', () => {
it('raises the adapter-node body-size limit (default 512K breaks KB uploads >0.5MB)', () => {
const compose = read('docker-compose.release.yml');
const donnaWeb = compose.slice(compose.indexOf('donna-web:'));
expect(donnaWeb).toContain('BODY_SIZE_LIMIT: ${DONNA_WEB_BODY_SIZE_LIMIT:-512M}');
});

it('documents DONNA_WEB_BODY_SIZE_LIMIT in .env.example', () => {
expect(read('.env.example')).toMatch(/^DONNA_WEB_BODY_SIZE_LIMIT=/m);
});
});