What
Create a Dockerfile for the backend, a Dockerfile for the frontend, and a docker-compose.yml at the project root that orchestrates all services (backend, frontend, PostgreSQL, Redis) for local development.
Why
DEPLOYMENT.md and README.md both reference Docker, but no Dockerfile or docker-compose configuration exists. New contributors currently need to manually install PostgreSQL, Redis, Node.js, Rust, and Circom just to run the backend locally. A docker-compose setup reduces onboarding from hours to minutes and ensures consistent environments across contributors.
Scope
In scope:
backend/Dockerfile — multi-stage build (build + production)
frontend/Dockerfile — multi-stage build (build + production)
docker-compose.yml at root — backend, frontend, postgres, redis services
.dockerignore files for backend and frontend
- Environment variable configuration via
.env file (reference .env.example)
- Health checks for all services in docker-compose
Out of scope:
- Kubernetes manifests
- CI/CD Docker image publishing
- Smart contract compilation in Docker (Rust/WASM toolchain is heavy; keep as local install)
- ZK circuit compilation in Docker
Acceptance Criteria
Technical Context
- Backend: NestJS on port 3001 (see
backend/src/main.ts)
- Frontend: Next.js on port 3000 (default)
- PostgreSQL: default port 5432, database name from
.env.example
- Redis: default port 6379
- Backend
.env.example has 71 lines of env vars — use these as the template
- Backend uses TypeORM with
synchronize: true in dev — migrations not required for local dev
What
Create a
Dockerfilefor the backend, aDockerfilefor the frontend, and adocker-compose.ymlat the project root that orchestrates all services (backend, frontend, PostgreSQL, Redis) for local development.Why
DEPLOYMENT.mdandREADME.mdboth reference Docker, but no Dockerfile or docker-compose configuration exists. New contributors currently need to manually install PostgreSQL, Redis, Node.js, Rust, and Circom just to run the backend locally. A docker-compose setup reduces onboarding from hours to minutes and ensures consistent environments across contributors.Scope
In scope:
backend/Dockerfile— multi-stage build (build + production)frontend/Dockerfile— multi-stage build (build + production)docker-compose.ymlat root — backend, frontend, postgres, redis services.dockerignorefiles for backend and frontend.envfile (reference.env.example)Out of scope:
Acceptance Criteria
docker-compose upstarts all 4 services (backend, frontend, postgres, redis)http://localhost:3001/api/v1http://localhost:3000docker-compose down -vcleanly tears down all services and volumes.dockerignoreexcludesnode_modules,.git,dist,targetTechnical Context
backend/src/main.ts).env.example.env.examplehas 71 lines of env vars — use these as the templatesynchronize: truein dev — migrations not required for local dev