Feat(Docker): Add Production-Ready Multi-Stage Docker Setup#7
Open
AnubhavGitHub07 wants to merge 1 commit intodevelopfrom
Open
Feat(Docker): Add Production-Ready Multi-Stage Docker Setup#7AnubhavGitHub07 wants to merge 1 commit intodevelopfrom
AnubhavGitHub07 wants to merge 1 commit intodevelopfrom
Conversation
|
Visit the preview URL for this PR (updated for commit d694718): https://codelabz-anubhav--pr-7-bh8ukm81.web.app (expires Mon, 16 Mar 2026 21:27:39 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: daeac1a46194ebcbfcb5f24f714b8354e16dd037 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Production-ready multi-stage Docker setup for Codelabz with separate development and production environments.
Changes
deps → builder → nginx:alpine) — 102MB final imageMotivation and Context
The existing Docker setup had critical issues:
This PR replaces it with a multi-stage build using Nginx for production serving, upgrades runtime to Node 18, and provides separate dev/prod environments with comprehensive documentation.
How Has This Been Tested?
Production Build
docker build -t codelabz:production .✅ Exit code: 0
✅ Image size: 102MB
✅ Build time: ~130s
Production Run
✅ HTTP 200 at
http://localhost:8080Health Check
docker inspect --format='{{.State.Health.Status}}' codelabz-testResult:
Security Headers Verification
Verified headers:
X-Frame-OptionsX-Content-Type-OptionsX-XSS-ProtectionReferrer-PolicyNo Source Code in Production Image
✅ Only static assets present
❌ No
node_modules❌ No
src❌ No
.envDevelopment Compose
✅ Vite dev server running at :5173
✅ Firebase Emulators running
Testing Environment
Testing Screenshots
Types of Changes
Checklist