This commit introduces Docker support to facilitate a consistent and isolated development environment for the React app. Docker allows developers to set up and run the application seamlessly across different machines and environments.
Changes:
Added Dockerfile.dev to build the React app with an official Node.js LTS image(18.12.1-apline).
Added Docker Compose configuration (docker-compose.dev.yml) to define a service for the React app, exposing port 3000 and mounting the application source code as a volume.
Environment variables are configured in the Docker Compose file, ensuring a proper development environment.
Included a Docker ignore file to exclude unnecessary files and directories from being added to the Docker image.
Updated .dockerignore file to exclude:
IDE-specific files and directories
Version control files
Build artifacts
Node.js modules (node_modules)
To run the app with Docker Compose:
Ensure Docker is installed on your machine and is running.
Run the following command in the project directory:
Start container docker-compose -f docker-compose.yml up --build
This will build the Docker image and start the React app, accessible at http://localhost:3000.
Feat: Add Dockerfile, Docker Compose configuration, Docker ignore file,
This commit introduces Docker support to facilitate a consistent and isolated development environment for the React app. Docker allows developers to set up and run the application seamlessly across different machines and environments.
Changes:
Updated .dockerignore file to exclude:
To run the app with Docker Compose:
Start container
docker-compose -f docker-compose.yml up --build
This will build the Docker image and start the React app, accessible at http://localhost:3000.