Description:
Implement Docker support for both the frontend and backend applications to standardize development, testing, and deployment environments. Additionally, configure automated package publishing (via GitHub Actions or similar CI/CD) to streamline deployment workflows.
Goals:
• Create optimized Dockerfiles for:
• Frontend (React app) — including multi-stage builds for dependency installation, build, and runtime stages.
• Backend (Node.js / Express app) — ensuring production-ready images with environment variables and volume persistence.
• Ensure both images:
• Use minimal base images (e.g., node:18-alpine).
• Include .dockerignore files to reduce build context size.
• Support environment variables for configuration (.env → Docker ENV).
• Verify compatibility with local and production environments (e.g., Docker Compose setup).
• Configure CI/CD pipelines to build, tag, and publish images to a registry (e.g., GitHub Container Registry, Docker Hub, or AWS ECR).
Deliverables:
• Dockerfile in /frontend/
• Dockerfile in /backend/
• .dockerignore files in both projects
• Optional: docker-compose.yml for local dev orchestration
• GitHub Actions workflow to:
• Build and tag images (using git SHA or version)
• Push to container registry on main branch merges or tagged releases
Suggestions:
• Optimize build caching (use npm ci and cache node_modules between stages).
• For frontend, serve built app with a lightweight web server (e.g., nginx or next start).
• For backend, include health checks and persist necessary volumes (e.g., logs, uploaded files).
Description:
Implement Docker support for both the frontend and backend applications to standardize development, testing, and deployment environments. Additionally, configure automated package publishing (via GitHub Actions or similar CI/CD) to streamline deployment workflows.
Goals:
• Create optimized Dockerfiles for:
• Frontend (React app) — including multi-stage builds for dependency installation, build, and runtime stages.
• Backend (Node.js / Express app) — ensuring production-ready images with environment variables and volume persistence.
• Ensure both images:
• Use minimal base images (e.g., node:18-alpine).
• Include .dockerignore files to reduce build context size.
• Support environment variables for configuration (.env → Docker ENV).
• Verify compatibility with local and production environments (e.g., Docker Compose setup).
• Configure CI/CD pipelines to build, tag, and publish images to a registry (e.g., GitHub Container Registry, Docker Hub, or AWS ECR).
Deliverables:
• Dockerfile in /frontend/
• Dockerfile in /backend/
• .dockerignore files in both projects
• Optional: docker-compose.yml for local dev orchestration
• GitHub Actions workflow to:
• Build and tag images (using git SHA or version)
• Push to container registry on main branch merges or tagged releases
Suggestions:
• Optimize build caching (use npm ci and cache node_modules between stages).
• For frontend, serve built app with a lightweight web server (e.g., nginx or next start).
• For backend, include health checks and persist necessary volumes (e.g., logs, uploaded files).