This repository contains a full-stack application with a React frontend and an Express backend. The application is containerized using Docker and Docker Compose to ensure seamless development and deployment.
Before you begin, ensure you have the following software installed on your machine:
-
Clone the repository:
git clone https://github.com/yourusername/your-repo-name.git cd your-repo-name -
Ensure the correct files are in place:
Dockerfilein both theserverandclientdirectories.docker-compose.ymlin the root directory.
To run the application, follow these steps:
-
Build and Start the Containers:
Run the following command from the root directory of the project:
docker-compose up --build
This command will:
- Build Docker images for both the server and the client.
- Start the server container first.
- The client container will wait for the server to be fully operational before starting.
-
Wait for the Setup:
Docker will pull base images, install dependencies, and start the services. This might take a few minutes the first time.
To stop the application, use the following command:
docker-compose downThis command stops and removes the containers, but the Docker images remain cached for faster startup next time.
Once the application is running, you can access it via your web browser:
- React Frontend: Available at
http://localhost:3000. - Express Backend API: Available at
http://localhost:3001.