fix: resolve upload EACCES and analysis start failure
Some checks failed
Deploy to VPS / deploy (push) Has been cancelled
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:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
}),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user