Skip to content

Conversation

@Avdhesh-Varshney
Copy link
Member

Pull Requests Review Criteria

Caution

PRs that fail to meet these review standards will be automatically flagged and may be rejected by maintainers.

  • Filled out this PR template properly
  • Did not commit directly to main
  • Limited commits (max 3–4 unless permitted by Admin/Mentors)
  • Added comments in complex parts of code

Closes: #472

Describe the add-ons or changes you've made 📃

  • Dockerize the FE & BE seprately
  • Dockerize the full project combinedly
  • Update the npm scripts

@Avdhesh-Varshney Avdhesh-Varshney self-assigned this Nov 20, 2025
@Avdhesh-Varshney Avdhesh-Varshney added the enhancement New feature or request label Nov 20, 2025
@vercel
Copy link

vercel bot commented Nov 20, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
code-a2z Ready Ready Preview Comment Nov 20, 2025 4:51pm
code-a2z-server Ready Ready Preview Comment Nov 20, 2025 4:51pm

@github-actions
Copy link

Thank you for submitting your pull request! We'll review it as soon as possible. For further communication, join our discord server https://discord.gg/tSqtvHUJzE.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a comprehensive Docker setup for the Code A2Z project, enabling containerized development and deployment. The Docker configuration supports three modes: backend-only (server + MongoDB), frontend-only (client), and full-stack (client + server + MongoDB). The setup includes multi-stage Dockerfiles for both client and server, docker-compose configurations at multiple levels, and extensive documentation in a new DOCKER.md file. Additionally, it corrects a documentation error regarding the VITE_SERVER_DOMAIN configuration and updates CORS settings for better Docker compatibility.

Key Changes:

  • Added multi-stage Dockerfiles for client (React/Vite) and server (Node.js/Express) with separate development and production builds
  • Created docker-compose configurations at root, client, and server levels for flexible development workflows
  • Added mongo-express service for database management and inspection
  • Corrected VITE_SERVER_DOMAIN documentation (removed incorrect /api suffix)

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
server/src/server.js Modified CORS configuration from origin: '*' to origin: true and updated methods/headers arrays
server/package.json Added Docker-related npm scripts (docker:up, docker:down, docker:logs, etc.)
server/docker-compose.yaml Complete rewrite: added development build target, env_file, volumes, mongo-express service, and named volumes/networks
server/Dockerfile Multi-stage Dockerfile with separate development and production stages using node:20-alpine
server/.dockerignore Comprehensive ignore file excluding dependencies, env files, logs, IDE files, and Docker-related files
package.json Renamed install:all to install and added extensive Docker scripts for root, client, and server
docs/SETUP.md Fixed VITE_SERVER_DOMAIN documentation (removed /api suffix)
docs/DOCKER.md New comprehensive Docker setup guide (1094 lines) covering all three development modes, troubleshooting, and MongoDB interaction
docker-compose.yaml New root-level full-stack compose file with client, server, mongo, and mongo-express services
client/package.json Added Docker-related npm scripts matching server pattern
client/nginx.conf New nginx configuration for production builds with gzip, security headers, and React Router support
client/docker-compose.yaml New frontend-only compose file for UI development
client/Dockerfile Multi-stage Dockerfile with development (Vite), build, and production (nginx) stages
client/.dockerignore Comprehensive ignore file excluding build outputs, dependencies, and environment files

@Avdhesh-Varshney
Copy link
Member Author

@copilot do all the changes in this pull request to apply changes based on the comments in this thread

Copy link
Contributor

Copilot AI commented Nov 20, 2025

@Avdhesh-Varshney I've opened a new pull request, #1330, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 3 commits November 20, 2025 16:19
Address Docker security and best practices from PR review
@Avdhesh-Varshney Avdhesh-Varshney merged commit 6ed5411 into main Nov 20, 2025
1 check passed
@Avdhesh-Varshney Avdhesh-Varshney deleted the avdhesh/docker-setup branch November 20, 2025 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🧑‍💻: Dockerize the app

2 participants