This repository was archived by the owner on Jun 12, 2026. It is now read-only.
Added Docker-based Development & Production Environment Setup#52
Open
ronakmaheshwari wants to merge 1 commit into
Open
Added Docker-based Development & Production Environment Setup#52ronakmaheshwari wants to merge 1 commit into
ronakmaheshwari wants to merge 1 commit into
Conversation
Owner
|
Thanks for your contribution, looks good to me so far, I will double check and merge later this week. |
Author
|
@jonasstrehle any updates |
codeCraft-Ritik
left a comment
There was a problem hiding this comment.
Opting for Node 20 Alpine is a great choice for keeping image sizes small and sticking to the LTS. However, for the production Dockerfile, are you using a multi-stage build? This would allow you to compile the TypeScript code in a "build" stage and only copy the compiled /dist and production node_modules to the final image, further reducing the attack surface and image size.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
PR: Add Docker-based Development & Production Environment Setup
Overview
This PR introduces a complete Docker environment for local development and production, allowing contributors to easily set up and run the project without manual dependency configuration.
It resolves Issue #51 – “Docker Environment for contribution” by providing:
Dockerfile.dev→ development with live reload (nodemon + ts-node)Dockerfile→ production-ready image builddocker-compose.dev.yml→ quick developer setupdocker-compose.prod.yml(optional, for deployment).env.exampleand environment variable supportTypeScript & Express type fixes
Updated
package.jsonscripts (build/start/dev)Changes
Benefits
Simplifies onboarding for new contributors
Ensures consistent development environment
Supports live code updates with nodemon
Clean separation between development & production
Compatible with existing project structure & configuration
Prevents TypeScript infinite build loop and Express type errors
Installation & Usage
1. Development Environment
Then open:
http://localhost:10080 → main
http://localhost:10081 → demo
Live reload is enabled via nodemon.
2. Production Build
OR manual build:
TypeScript build
Run normally
Notes
Uses Node 20 Alpine (recommended LTS instead of Node 22)
skipLibCheckadded to avoid breaking Express typingsVolume mounting prevents conflicts between host and container
node_modulesSupports both
.envand.env.localhostChecklist
Docker environment added
Dev & prod builds verified locally
TypeScript build successful
No breaking changes to existing codebase
Linked to issue Docker Environment for contribution #51
Related Issue
Closes #51