-
Notifications
You must be signed in to change notification settings - Fork 356
Docker setup #1329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker setup #1329
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
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. |
There was a problem hiding this 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
/apisuffix)
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 |
|
@copilot do all the changes in this pull request to apply changes based on the comments in this thread |
|
@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. |
…mentation fixes Co-authored-by: Avdhesh-Varshney <[email protected]>
Co-authored-by: Avdhesh-Varshney <[email protected]>
Address Docker security and best practices from PR review
Pull Requests Review Criteria
Caution
PRs that fail to meet these review standards will be automatically flagged and may be rejected by maintainers.
mainCloses: #472
Describe the add-ons or changes you've made 📃