Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hasanmd91 committed Jan 15, 2024
1 parent 47966a9 commit dbcd844
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 38 deletions.
File renamed without changes.
19 changes: 0 additions & 19 deletions .github/workflows/pull_request.yml

This file was deleted.

File renamed without changes.
61 changes: 55 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,30 @@

## Table of Contents

## Table of Contents

1. [Project Overview](#project-overview)
2. [Features](#features)
3. [Project Setup Instructions](#project-setup-instructions)
4. [Testing](#testing)
5. [Architecture](#architecture)
6. [Database Design](#database-design)
7. [Endpoints](#endpoints)
- [Frontend](#frontend)
- [Backend](#backend)
- [Swagger Documentation](#swagger-documentation)
- [Technologies](#technologies)
2. [Docker](#docker)
3. [GitHub Actions Workflow](#github-actions-workflow)
4. [Features](#features)
- [User Management](#user-management)
- [Admin Functionalities](#admin-functionalities)
5. [Project Setup Instructions](#project-setup-instructions)
6. [Testing](#testing)
7. [Architecture](#architecture)
8. [Database Design](#database-design)
9. [Endpoints](#endpoints)
- [Authentication](#authentication)
- [Category](#category)
- [Order](#order)
- [Product](#product)
- [Review](#review)
- [User](#user)
10. [Demo](#demo)

## Project Overview

Expand All @@ -36,6 +53,34 @@ This backend project is build wtih ASP.NET Core, Entity Framework Core, and Post
- Xunit
- Microsoft Azure

## Docker

To use the pre-built Docker image for this project, you can pull it from Docker Hub. Run the following command:

```
docker pull hasanmd91/ilhbackend
```

Once the image is pulled, you can run the Docker container using the following command:

```
docker run -p 8080:8080 hasanmd91/ilhbackend
```

Alternatively, you can run the docker-compose.yml file, you can use the following command to build and start the container

```
docker-compose up --build
```

## GitHub Actions Workflow

The CI/CD pipeline is defined in the `.github/workflows` directory and it consists of the following stages:

- **Build:** Build the project and dependencies.
- **Test:** Run unit tests and any other relevant tests.
- **Docker:** Build and push the docker image to the docker hub.

## Features

### User Management:
Expand Down Expand Up @@ -170,3 +215,7 @@ dotnet test
| GET | `/api/user/{userId}` |
| PATCH | `/api/user/{userId}` |
| DELETE | `/api/user/{userId}` |

## Demo

[![Youtube Demo](https://img.youtube.com/vi/kPy1wzJwmSU/0.jpg)](https://www.youtube.com/watch?v=kPy1wzJwmSU)
47 changes: 34 additions & 13 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,38 @@
version: '3'

version: '3.8'
networks:
dev:
driver: bridge
services:
# ilh-frontend service
ilh-frontend:
image: hasanmd91/ilhfrontend
ports:
- '3000:3000'

# ilh-server service
ilh-server:
image: docker.io/hasanmd91/ilh-backend
image: docker.io/library/ilh-server
depends_on:
- app_db
container_name: ilh-services
ports:
- '8080:8080'
networks:
dev:
driver: bridge
build:
context: .
dockerfile: Dockerfile
environment:
- ConnectionStrings__LocalDb=Host=localhost;Database=Ecom;Username=postgres;Password=postgres
- ASPNETCORE_URLS=http://+:8080
- DB_CONNECTION_POOL_SIZE=20
networks:
- dev
app_db:
image: postgres:latest
container_name: app_db
environment:
POSTGRES_DB: Ecom
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- '5433:5432'
restart: always
volumes:
- app_data:/var/lib/postgresql/data
networks:
- dev

volumes:
app_data:

0 comments on commit dbcd844

Please sign in to comment.