Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ go.work.sum
api/renderer_impl.go
api/storage_impl.go
nginx/default.svg
.DS_Store
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ GitHub Banners fetches user data from the GitHub API, calculates aggregated stat
---

## Architecture

![](https://github.com/user-attachments/assets/41a7b574-3151-4fb8-9cd1-57caa630b88c)

### Github Stats Caching Strategy
Expand Down Expand Up @@ -87,14 +88,19 @@ GitHub Banners fetches user data from the GitHub API, calculates aggregated stat
**1. Clone the repository**

```bash
git clone https://github.com/yourusername/github-banners.git
git clone https://github.com/hurtki/github-banners.git
cd github-banners
```

**2. Configure environment variables**

> Use `.env.example` that lay in every folder

Oneliner ( some changes, like api tokens may be required )

```
cp .env.example .env ; cp ./api/.env.example ./api/.env ; cp ./renderer/.env.example ./renderer/.env ; cp ./storage/.env.example ./storage/.env
```

- Root `.env`
- `api/.env`
Expand All @@ -107,7 +113,7 @@ cd github-banners

```bash
docker compose up --build
# Detached mode ( only build logs )
# OR Detached mode ( only build logs )
docker compose up --build -d
```

Expand All @@ -117,14 +123,23 @@ Cloudflare configuration:

![telegram-cloud-photo-size-4-5915536458141862905-y](https://github.com/user-attachments/assets/999e1068-c555-4242-b78f-cc11d65f6de3)


Where to get cert and key:

![telegram-cloud-photo-size-4-5915536458141862904-m](https://github.com/user-attachments/assets/abd524e5-4cfa-468c-8e3c-4537b9d45d94)


Put certificate `cert.pem` and private key `key.pem` to `/etc/nginx/ssl/`

Docker compose

```bash
# production docker compose uses already built images from dockerhub
# VER should be in "x.x.x" format
# check images: https://hub.docker.com/repository/docker/hurtki/github-banners-api/tags

export VER=$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//')
docker compose -f docker-compose.prod.yaml up -d
```

### Development

> For testing consider using "dev" version of docker compose
Expand Down
Loading