fix: resolve upload EACCES and analysis start failure
Some checks failed
Deploy to VPS / deploy (push) Has been cancelled

- Dockerfile: create /app/uploads with correct ownership before switching
  to the non-root nextjs user, fixing EACCES: permission denied on mkdir
- analyse-form.tsx: send 'title' and 'query' fields (not 'question') to
  match the /api/analyses endpoint contract, fixing 400 rejection that
  showed "Analyse konnte nicht gestartet werden"

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
CTO (LegalAI)
2026-04-09 22:01:45 +00:00
parent d7ab827b74
commit 23a66f92fc
2 changed files with 3 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ COPY --from=builder --chown=nextjs:nodejs /app/drizzle ./drizzle
COPY --from=builder --chown=nextjs:nodejs /app/migrate.mjs ./migrate.mjs
COPY --from=builder --chown=nextjs:nodejs /app/entrypoint.sh ./entrypoint.sh
RUN chmod +x ./entrypoint.sh
RUN mkdir -p /app/uploads && chown nextjs:nodejs /app/uploads
USER nextjs
EXPOSE 3000
ENV PORT=3000

View File

@@ -37,7 +37,8 @@ export default function AnalyseForm({ cases }: { cases: CaseOption[] }) {
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
mode,
question: question.trim(),
title: `${MODES.find((m) => m.key === mode)?.label ?? mode}${question.trim().slice(0, 80)}`,
query: question.trim(),
caseId: caseId || undefined,
}),
});