Docker Guide
This repo ships both a local development compose file and a production-oriented compose file.
Local Development Compose
Start everything:
docker compose -f infrastructure/docker/docker-compose.yml up --build
Run only data services in the background:
docker compose -f infrastructure/docker/docker-compose.yml up -d postgres redis
The local compose file currently starts:
postgreson5432redison6379apion8000frontendon3000
Useful Commands
docker compose -f infrastructure/docker/docker-compose.yml ps
docker compose -f infrastructure/docker/docker-compose.yml logs -f api
docker compose -f infrastructure/docker/docker-compose.yml logs -f frontend
docker compose -f infrastructure/docker/docker-compose.yml restart api
docker compose -f infrastructure/docker/docker-compose.yml build api
docker compose -f infrastructure/docker/docker-compose.yml down
docker compose -f infrastructure/docker/docker-compose.yml down -v
Validate the Local Stack
Once the containers are up:
curl http://localhost:8000/health
curl http://localhost:8000/ready
open http://localhost:3000
Production Compose
The production file in this repo is:
infrastructure/docker/docker-compose.production.yml
Bring it up with:
docker compose -f infrastructure/docker/docker-compose.production.yml up -d --build
Inspect it with:
docker compose -f infrastructure/docker/docker-compose.production.yml ps
docker compose -f infrastructure/docker/docker-compose.production.yml logs -f api
Environment Variables
Typical values for local container work:
DATABASE_URL=postgresql://mutx:mutx_password@postgres:5432/mutx
API_HOST=0.0.0.0
API_PORT=8000
JWT_SECRET=dev-secret-change-in-production
NEXT_PUBLIC_API_URL=http://localhost:8000
NEXT_PUBLIC_SITE_URL=http://localhost:3000
Testing Notes
- The
apiimage installsrequirements.txt, not the root dev extras, sopytestis not available in that container by default. npm testruns the Jest unit suite intests/unit.- Playwright targets the local standalone app server from
playwright.config.ts; runnpm run buildbefore e2e checks so.next/standaloneexists.
For verification, prefer host commands such as:
npm run lint
npm run build
npx playwright test --list
