fix(deploy): resolve Docker startup and CSRF issues

- Rename TASKPLANER_DATA_DIR to DATA_DIR (avoid adapter-node envPrefix conflict)
- Add TASKPLANER_ORIGIN for CSRF protection in docker-compose.yml
- Add automatic database schema initialization on startup
- Add Playwright E2E tests for Docker deployment verification
- Update .env.example with correct variable names

Fixes container restart loop and 403 errors on form submission.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Thomas Richter
2026-02-01 15:54:44 +01:00
parent 89e703daa5
commit 84ad332737
11 changed files with 304 additions and 7 deletions

View File

@@ -0,0 +1,49 @@
---
status: complete
phase: 06-deployment
source: 06-01-SUMMARY.md, 06-02-SUMMARY.md
started: 2026-02-01T12:30:00Z
updated: 2026-02-01T12:30:00Z
---
## Current Test
[testing complete]
## Tests
### 1. Docker Build Succeeds
expected: Run `docker compose build` — build completes without errors
result: pass
### 2. Container Starts and Runs
expected: Run `docker compose up -d` — container starts, `docker compose ps` shows healthy status
result: pass
### 3. Application Accessible
expected: Open http://localhost:3000 in browser — TaskPlanner UI loads, shows entry list
result: pass
### 4. Health Endpoint Returns 200
expected: Run `curl http://localhost:3000/health` — returns 200 OK with JSON status
result: pass
### 5. Data Persists Across Restart
expected: Create a test entry, run `docker compose restart`, refresh browser — entry still exists
result: pass
### 6. Backup Script Creates Archive
expected: Run `./backup.sh` — creates timestamped .tar.gz file in backups/ directory
result: pass
## Summary
total: 6
passed: 6
issues: 0
pending: 0
skipped: 0
## Gaps
[none yet]