Skip to content

Commit e5d1d7b

Browse files
committed
Readme.md updated
1 parent 42216f1 commit e5d1d7b

File tree

2 files changed

+62
-2
lines changed

2 files changed

+62
-2
lines changed

README.md

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Uber Project
2+
3+
Welcome to the Uber project repository. This project uses Docker images for both the backend server and the frontend client to simulate a ride-sharing service.
4+
5+
## Introduction
6+
7+
This project is a simple Uber-like service simulation comprising:
8+
- **Backend Server:** Pre-built Docker image running on Node.js.
9+
- **Frontend Client:** Pre-built Docker image built with a modern frontend framework.
10+
- **MongoDB:** Serves as the primary database.
11+
12+
## Getting Started
13+
14+
### Using GitHub
15+
1. Clone the repository:
16+
```bash
17+
git clone https://github.com/harshutech/uber
18+
```
19+
2. Navigate to the project directory:
20+
```bash
21+
cd uber-project
22+
```
23+
24+
### Using Docker Compose
25+
1. Ensure [Docker Compose](https://docs.docker.com/compose/) is installed.
26+
2. Run the following command in the project root:
27+
```bash
28+
docker-compose up
29+
```
30+
This command starts the backend, frontend, and MongoDB services as defined in the `docker-compose.yml` file.
31+
32+
## Environment Configuration
33+
34+
- The backend uses environment variables loaded from `backend/.env`. Be sure to customize this file if needed.
35+
- The Docker services communicate on a dedicated network (`app-network`).
36+
37+
## Troubleshooting & Logs
38+
39+
- If a service fails to start, review the container logs:
40+
```bash
41+
docker-compose logs <service-name>
42+
```
43+
- Verify that ports 3000, 5173, and 27017 are not in use.
44+
- For persistent MongoDB data, a named volume `mongo-data` is used.
45+
46+
## Additional Information
47+
48+
- Restart policies are added to all services to ensure they automatically recover from failures.
49+
- For further details, refer to the inline comments in the configuration files.
50+
51+
### Direct Image Access
52+
53+
If you prefer to pull the Docker image directly, run:
54+
```bash
55+
docker pull harshpatil20/uber_prototype
56+
```
57+
// ...existing documentation or further instructions...

docker-compose.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
services:
22
server:
33
image: harshpatil20/uber-server:latest # Use pre-built backend image
4+
restart: always
45
ports:
56
- "3000:3000"
67
env_file:
@@ -14,6 +15,7 @@ services:
1415

1516
client:
1617
image: harshpatil20/uber-client:latest # Use pre-built frontend image
18+
restart: always
1719
ports:
1820
- "5173:5173"
1921
environment:
@@ -25,6 +27,7 @@ services:
2527

2628
mongo:
2729
image: mongo
30+
restart: always
2831
ports:
2932
- "27017:27017"
3033
volumes:
@@ -33,7 +36,7 @@ services:
3336
- app-network
3437

3538
networks:
36-
app-network:
39+
app-network: # Custom network for inter-service communication
3740

3841
volumes:
39-
mongo-data:
42+
mongo-data: # Named volume for persistent MongoDB data

0 commit comments

Comments
 (0)