Capstone Project Setup
Think of building a house: before walls and furniture, you need a solid foundation — blueprints, materials, and a construction site. In the Capstone Project, setup is that foundation. Learners define the application stack, prepare Dockerfiles, and configure the repository so everything is ready for development, CI/CD, and deployment.
Project Setup Foundations
1. Choosing the Application Stack
- Frontend: React, Angular, or Vue (web interface).
- Backend API: Node.js/Express, Python/Flask, or Java/Spring Boot.
- Database: PostgreSQL, MySQL, or MongoDB.
- Optional Services:
- Cache (Redis).
- Message broker (RabbitMQ).
- Monitoring (Prometheus).
2. Repository Structure
A well‑organized repository ensures clarity and maintainability.
docker-capstone/
├── frontend/
│ └── Dockerfile
├── backend/
│ └── Dockerfile
├── database/
│ └── Dockerfile
├── docker-compose.yml
├── ci-cd/
│ └── pipeline.yml
└── docs/
└── architecture.md
3. Environment Setup
- Local Environment: Install Docker Engine or Docker Desktop.
- Version Control: Initialize Git repository.
- Registry Access: Create Docker Hub or private registry account.
- CI/CD Tool: GitHub Actions, GitLab CI, or Jenkins.
Things to Remember
- A clear application stack defines project scope.
- Repository structure ensures modularity and scalability.
- Environment setup prepares for smooth development and deployment.
Hands‑On Lab
Step 1: Create Project Repository
mkdir docker-capstone
cd docker-capstone
git init
Step 2: Define Frontend Dockerfile (React Example)
FROM node:16
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
CMD ["npm", "start"]
Step 3: Define Backend Dockerfile (Node.js Example)
FROM node:16
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
CMD ["node", "server.js"]
Step 4: Define Database Dockerfile (Postgres Example)
FROM postgres:13
ENV POSTGRES_USER=admin
ENV POSTGRES_PASSWORD=secret
ENV POSTGRES_DB=capstone
Step 5: Create Compose File
version: '3.8'
services:
frontend:
build: ./frontend
ports:
- "3000:3000"
backend:
build: ./backend
ports:
- "5000:5000"
depends_on:
- database
database:
build: ./database
ports:
- "5432:5432"
Practice Exercise
- Choose your application stack (frontend, backend, database).
- Create a Git repository and organize folders.
- Write Dockerfiles for each service.
- Create a
docker-compose.ymlto orchestrate services locally. - Run
docker-compose upand verify all services start correctly. - Reflect on how setup lays the foundation for CI/CD and deployment.
Visual Learning Model
Capstone Setup
├── Frontend → React/Angular/Vue
├── Backend → Node.js/Flask/Spring
├── Database → Postgres/MySQL/MongoDB
├── Compose → orchestrate services
└── CI/CD → pipeline config
Things to Remember
Capstone Project setup defines the application stack, organizes the repository, and prepares the environment. By writing Dockerfiles and a Compose file, learners establish the foundation for CI/CD, deployment, monitoring, and security in later chapters.
