https://github.com/samrath49/vendorhub
https://github.com/samrath49/vendorhub
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/samrath49/vendorhub
- Owner: Samrath49
- License: mit
- Created: 2024-12-26T06:23:13.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-10T18:48:23.000Z (over 1 year ago)
- Last Synced: 2025-01-10T19:39:57.063Z (over 1 year ago)
- Language: Python
- Size: 37.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VendorHub
VendorHub is a Django-based microservices project designed for managing vendor-related operations. The project leverages Docker and Docker Compose for seamless containerized development and deployment.
---
## Prerequisites
Before setting up the project locally, ensure you have the following installed:
- [Docker](https://www.docker.com/get-started)
- [Docker Compose](https://docs.docker.com/compose/)
---
## Setup Instructions
1. Clone the repository:
```bash
git clone https://github.com/Samrath49/vendorhub.git
cd vendorhub
```
2. Create and configure the `.env` file:
- Copy `.env.example` to `.env`
```bash
cp .env.example .env
```
3. Build and start the Docker containers:
```bash
docker-compose up --build
```
4. Access the application:
- The Django development server will be available at `http://localhost:8000`.
## Prerequisites
### Running the Project
```bash
docker-compose down
docker-compose up --build
```
### Checking Service Health
```bash
docker-compose exec redis redis-cli ping
docker-compose exec db psql -U postgres
docker-compose exec web python manage.py check
```
### Managing Migrations
- Create and apply migrations for services:
```bash
docker-compose exec web python manage.py makemigrations base
docker-compose exec web python manage.py migrate base
docker-compose exec web python manage.py makemigrations product_service
docker-compose exec web python manage.py makemigrations order_service
docker-compose exec web python manage.py makemigrations payment_service
docker-compose exec web python manage.py makemigrations shipment_service
docker-compose exec web python manage.py migrate
```
### Deleting the Database
```bash
docker volume rm vendorhub_postgres_data
```
### Deleting Migration Files
```bash
find . -path "*/migrations/*.py" -not -name "__init__.py" -delete
```