Skip to content

US-3: Docker multi-stage build and Docker Compose deployment #9

@arampp

Description

@arampp

Epic

Part of #1 (EPIC-1 — Project Scaffold & Infrastructure)

User Story

As the owner self-hosting Procastimarks,
I want to start the application with a single docker compose up command,
so that deployment and upgrades require no manual steps.

Acceptance Criteria

  • docker build . succeeds and produces an image < 200 MB
  • Multi-stage Dockerfile: stage 1 compiles the Rust binary; stage 2 is a minimal
    runtime image containing only the binary and static assets
  • docker compose up starts the container and the /health endpoint responds
  • SQLite database file is stored on a named Docker volume (survives docker compose down without -v)
  • README (or compose file comment) explicitly warns that docker compose down -v
    destroys all data (C-8)
  • API_KEY environment variable is passed via docker-compose.yml (or .env file)

INVEST

Criterion Notes
Independent Can be started in parallel with US-8 after US-7
Negotiable Base image choice is open
Valuable Delivery mechanism for the self-hosted product
Estimable ~half a day
Small Infra only; no feature logic
Testable docker compose up + health check is concrete

Technical Notes (arc42 §7)

  • cross or cargo-leptos build inside the Docker build stage
  • WASM assets copied into the runtime image
  • Named volume mounted at /data; DATABASE_URL=/data/procastimarks.db
  • ATAM condition C-8: data-loss warning must be present in docs

Dependencies

MoSCoW: Must Have

Metadata

Metadata

Assignees

No one assigned

    Labels

    infrastructureSetup, DevOps, deployment, project scaffoldingmust-haveMoSCoW: Must Have — MVP criticaluser-storyA single INVEST-compliant user story

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions