|
| 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... |
0 commit comments