Skip to content

Set up self-contained Docker Compose development environment #243

Description

@jenul-ferdinand

Goal

  • Let contributors start the Angular frontend, Express backend, and MongoDB with one Docker Compose command.
  • Give each contributor a self-contained development database with realistic synthetic data, without MongoDB Atlas credentials.
  • Preserve hot reload for frontend and backend source changes during local development.

Implementation

  • Add development Dockerfiles and .dockerignore files for the frontend and backend.
  • Add a compose.yaml with frontend, backend, and MongoDB services plus a named database volume.
  • Configure the service network and set the backend MongoDB connection string to the Compose service name.
  • Pass backend secrets through an untracked environment file and provide a safe example file.
  • Add health checks and dependency conditions so Compose reports service readiness.
  • Add a documented seed process that creates a realistic, fictional dataset for local development. It must include users and the related data needed to exercise core contributor workflows.
  • Make the seed process safe to repeat and document how contributors can reset their local database and restore the sample data.
  • Update the contributing guide with prerequisites and commands for startup, logs, shutdown, database reset, and seed data.
  • Keep the existing npm-based development workflow available outside Docker.

Acceptance criteria

  • docker compose up --build starts all three services from a fresh checkout after the contributor creates the documented environment file.
  • The frontend responds at http://localhost:4200 and the backend responds at http://localhost:8080.
  • Frontend API requests reach the backend, and the backend connects to the containerized MongoDB instance without host-installed services or MongoDB Atlas.
  • A first-run local database contains synthetic sample data that lets a contributor use and develop the core application flows.
  • The sample data contains no production data, real credentials, or information about real users.
  • Contributors can reset their database and restore the sample data with documented commands.
  • Frontend and backend source changes trigger their development reloaders without an image rebuild.
  • MongoDB data survives docker compose down, and the documentation includes the command that removes the volume for a clean reset.
  • Docker build contexts exclude dependencies, build output, Git metadata, and environment files.
  • The repository contains no committed credentials or local environment values.

Metadata

Metadata

Labels

backenddatabaseMongoDB schema, indexes, migrations, queries, and data integrity.enhancementNew feature or requestfrontendinfraDeployment, Vercel config, CI/CD, env vars, and build pipeline.priority: mediumNormal priority. Pick up after high-priority items are clear.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions