Skip to content

Commit

Permalink
Merge pull request #31 from EpicOfficer/ENHANCEMENT/Actions
Browse files Browse the repository at this point in the history
Update Docker workflow and expand README content
  • Loading branch information
EpicOfficer authored Apr 15, 2024
2 parents bca9ed0 + c64d7a6 commit 0d326fb
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Publish Docker images
on:
pull_request:
branches: [ "main" ]
release:
types: [created]

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -44,6 +44,7 @@ jobs:
with:
images: ${{ matrix.image }}
tags: |
type=ref,event=tag
type=ref,event=branch
type=raw,pattern=latest,value=latest
type=sha,prefix=commit_,
Expand Down
2 changes: 2 additions & 0 deletions Blink3.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution
docker-compose.yml = docker-compose.yml
Configuration\appsettings.json = Configuration\appsettings.json
Configuration\appsettings.Development.json = Configuration\appsettings.Development.json
.github\workflows\build.yml = .github\workflows\build.yml
.github\workflows\docker-image.yml = .github\workflows\docker-image.yml
README.md = README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blink3.Tests", "Blink3.Tests\Blink3.Tests.csproj", "{D8F3BEB2-9D9B-49CD-8711-D1A4BA78C689}"
Expand Down
43 changes: 42 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
# Blink
# Blink3
[![Build](https://github.com/EpicOfficer/Blink3/actions/workflows/build.yml/badge.svg)](https://github.com/EpicOfficer/Blink3/actions/workflows/build.yml)
[![Publish Docker Images](https://github.com/EpicOfficer/Blink3/actions/workflows/docker-image.yml/badge.svg)](https://github.com/EpicOfficer/Blink3/actions/workflows/docker-image.yml)

Blink3 is a .NET 8 project implemented with a multilayered architecture. This repository holds a Discord Bot solution that comes with an API, a Blazor front-end, and Discord Activity support. Multiple features, like a global to-do list and customizable wordle, are provided as well.

## Project Structure
The application is structured into multiple layers as follows:
1. `Blink3.API`: A .NET 8 REST API that contains endpoints for the `Blink3.Web` and `Blink3.Activity` presentation layers, and includes a Discord OAuth implementation.
2. `Blink3.Web`: A Blazor WASM front-end that supports login through the API utilizing Discord OAuth, and allows users to manage the bot.
3. `Blink3.Activity`: A Work-in-Progress presentation layer which will integrate with Discord Activity.
4. `Blink3.Bot`: The main presentation layer, developed in .Net 8 using Discord.Net, responsible for running the discord bot.
5. `Blink3.DataAccess`: A layer consisting of data access repositories and an EF Core code-first DbContext.
6. `Blink3.Core`: A shared library that contains common business logic interfaces, enums, and models.

## Features
Currently, the bot provides several commands, including:
- `/temp`: Base command to create and manage temporary Voice Channels.
- `/define`: Get the definition of an English word.
- `/wordle`: Start a new wordle game in the current channel.
- `/guess`: Attempt to guess the wordle.
- `/leaderboard`: Displays a global wordle points leaderboard.
- `/todo`: Base command for managing your to-do list.
- `/config`: Allows guild admins to change bot settings for their guild.

## Build & Run
Blink3 includes multiple Docker images for each of the solution's parts and Docker Compose files for orchestration. The Docker Compose files included are:
- `docker-compose.yml` - The base Docker Compose file.
- `docker-compose.development.yml` - Overwrites the base configuration for local development. References the images built in the local solution.
- `docker-compose.production.yml` - Overwrites the base configuration for production environments. References the images hosted on GitHub Container Registry.

To build and run the application using Docker Compose, you can execute the following commands:

For local development:

docker-compose -f docker-compose.yml -f docker-compose.development.yml up --build

For production:

docker-compose -f docker-compose.yml -f docker-compose.production.yml up --build

An `.env.example` file has been included in the repository. Rename or copy this file to `.env` and replace the sample values with your actual environment values to set up your environment.

Please note that the development Compose file references the Docker build images in the solution, while the production one uses the images from the GitHub Container Registry.

0 comments on commit 0d326fb

Please sign in to comment.