lms/specs/001-add-dokploy-deploy/tasks.md

89 lines
5.6 KiB
Markdown

---
description: "Task list for feature 001-add-dokploy-deploy"
---
# Tasks: Dokploy deployment (001-add-dokploy-deploy)
**Input**: Design documents in `specs/001-add-dokploy-deploy/` (spec.md, checklists/)
## Phase 1: Setup (Shared Infrastructure)
- [X] T001 Create `specs/001-add-dokploy-deploy/plan.md` using `.specify/scripts/bash/setup-plan.sh` (output path: specs/001-add-dokploy-deploy/plan.md)
- [X] T002 [P] Create `specs/001-add-dokploy-deploy/quickstart.md` with a minimal deploy verification procedure (file: specs/001-add-dokploy-deploy/quickstart.md)
- [X] T003 [P] Add `specs/001-add-dokploy-deploy/contracts/dokploy-webhook.json` documenting the Dokploy webhook URL and expected payload (file: specs/001-add-dokploy-deploy/contracts/dokploy-webhook.json)
- [X] T004 Initialize `specs/001-add-dokploy-deploy/checklists/deployment-credentials.md` describing how to add Dokploy project-level secrets (file: specs/001-add-dokploy-deploy/checklists/deployment-credentials.md)
---
## Phase 2: Foundational (Blocking Prerequisites)
- [X] T005 [P] Create `specs/001-add-dokploy-deploy/data-model.md` describing Repository, Webhook, Deployment entities (file: specs/001-add-dokploy-deploy/data-model.md)
- [X] T006 [P] Create `specs/001-add-dokploy-deploy/research.md` capturing Dokploy access requirements and integration notes (file: specs/001-add-dokploy-deploy/research.md)
- [X] T007 Create `specs/001-add-dokploy-deploy/dokploy-config.md` with canonical compose file path (`docker-compose.yml`) and Dokploy project config (file: specs/001-add-dokploy-deploy/dokploy-config.md)
- [X] T008 [P] Add `specs/001-add-dokploy-deploy/contracts/gitea-webhook-setup.md` with step-by-step instructions for creating the Gitea webhook pointing to Dokploy (file: specs/001-add-dokploy-deploy/contracts/gitea-webhook-setup.md)
---
## Phase 3: User Story 1 - Auto-deploy on repository push (Priority: P1) [US1] 🎯 MVP
**Goal**: Configure automatic Dokploy compose deployments when commits are pushed to `main`.
**Independent Test**: Push a test commit to `main` and verify a Dokploy deployment run starts and completes per `specs/001-add-dokploy-deploy/quickstart.md`.
- [X] T009 [US1] Add `specs/001-add-dokploy-deploy/contracts/push-to-deploy.md` documenting the exact Gitea -> Dokploy webhook flow and required repo settings (file: specs/001-add-dokploy-deploy/contracts/push-to-deploy.md)
- [X] T010 [P] [US1] Add a test helper script `scripts/test_dokploy_webhook.sh` that sends a representative push webhook to the Dokploy URL (file: scripts/test_dokploy_webhook.sh)
- [X] T011 [US1] Add `specs/001-add-dokploy-deploy/quickstart.md` step to verify deployment and application health check commands (file: specs/001-add-dokploy-deploy/quickstart.md)
- [X] T012 [US1] Add Dokploy project-level secret instructions in `specs/001-add-dokploy-deploy/checklists/deployment-credentials.md` including where to store the webhook URL (file: specs/001-add-dokploy-deploy/checklists/deployment-credentials.md)
---
## Phase 4: User Story 2 - Manual deploy trigger (Priority: P2) [US2]
**Goal**: Allow operators to manually trigger deployments for a specific commit or tag via Dokploy.
**Independent Test**: Trigger a manual deploy for a specified commit/tag and verify deployed commit matches requested commit.
- [ ] T013 [US2] Create `specs/001-add-dokploy-deploy/manual-deploy.md` documenting manual deploy steps in the Dokploy UI and example payloads (file: specs/001-add-dokploy-deploy/manual-deploy.md)
- [ ] T014 [P] [US2] Add `specs/001-add-dokploy-deploy/contracts/manual-deploy-payload.json` as an example payload for manual triggers (file: specs/001-add-dokploy-deploy/contracts/manual-deploy-payload.json)
---
## Phase 5: User Story 3 - Failed-deploy notification (Priority: P3) [US3]
**Goal**: Provide clear failure visibility and runbooks for operators when deployments fail.
**Independent Test**: Simulate a failing deploy and verify logs and notification entries are available per runbook.
- [ ] T015 [US3] Create `specs/001-add-dokploy-deploy/runbooks/failed-deploy.md` describing how to investigate Dokploy failures and roll back (file: specs/001-add-dokploy-deploy/runbooks/failed-deploy.md)
- [X] T016 [P] [US3] Add `scripts/simulate_failed_deploy.sh` to simulate a bad compose deploy for testing failure paths (file: scripts/simulate_failed_deploy.sh)
---
## Phase N: Polish & Cross-Cutting Concerns
- [ ] T017 [P] Update repository `README.md` with a "Deployment" section linking to `specs/001-add-dokploy-deploy/quickstart.md` (file: README.md)
- [ ] T018 Commit and push branch `001-add-dokploy-deploy` including `spec.md`, `tasks.md`, and all created docs/scripts (file: N/A - repo action)
---
## Dependencies & Execution Order
- Phase 1 (Setup): start immediately
- Phase 2 (Foundational): depends on Phase 1 completion
- Phases 3+ (User stories): depend on Phase 2 completion; once foundation is ready, user stories can be worked on in parallel
- Final polish: after user stories complete
## Parallel Execution Examples
- While Phase 2 is in progress, tasks marked `[P]` (e.g., T002, T003, T005, T006, T010, T014, T016) can be executed in parallel by different contributors.
- User story implementation tasks (US1, US2, US3) can proceed concurrently once foundational tasks complete.
## Implementation Strategy
- MVP: Implement Phase 1 + Phase 2 + Phase 3 (US1) first. Validate auto-deploy works end-to-end, then add US2 and US3.
- Iterative: After US1 is validated, perform US2 and US3 in parallel or by priority depending on team capacity.
---
**Files created by tasks**: All referenced files should be created under `specs/001-add-dokploy-deploy/` unless specified otherwise (e.g., scripts/).