# Phase 6: Deployment - Context

**Gathered:** 2026-02-01
**Status:** Ready for planning

<domain>
## Phase Boundary

Application runs in Docker with persistent data and easy configuration. Single docker-compose.yml starts the entire application. Data persists via named volumes.

</domain>

<decisions>
## Implementation Decisions

### Container Setup
- Node Alpine base image (small ~150MB)
- Multi-stage build: separate build dependencies from runtime
- Run as non-root user ('node' user for security)
- Include /health endpoint for Docker health checks

### Environment Configuration
- Extended config scope: PORT, DATA_DIR, log level, max upload size, etc.
- TASKPLANER_ prefix for all env vars (e.g., TASKPLANER_PORT)
- All env vars have sensible defaults (works out of the box, zero config required)
- Document in both README and .env.example template file

### Data Persistence
- Single volume for all data (/data mount with db + images subdirs)
- Include backup.sh script that users can run
- Backups stored in local ./backups directory by default
- App auto-creates /data/db and /data/images directories on first run

### Production Assumptions
- Designed to run behind reverse proxy (Nginx/Traefik handles HTTPS)
- docker-compose includes app only (no bundled reverse proxy)
- JSON logging format for log aggregators
- Trust X-Forwarded headers from proxy (for correct client IP logging)

### Claude's Discretion
- Exact multi-stage build structure
- Which extended env vars to include beyond PORT/DATA_DIR
- Health check implementation details
- Backup script format (tar, timestamp naming)

</decisions>

<specifics>
## Specific Ideas

- Works out of the box with zero configuration
- Single command to start: `docker-compose up -d`
- Backup script should be simple to run manually

</specifics>

<deferred>
## Deferred Ideas

None — discussion stayed within phase scope

</deferred>

---

*Phase: 06-deployment*
*Context gathered: 2026-02-01*
