https://github.com/baimamboukar/go-gin-docker-k8s
Small backend example built using Go Gin Docker and K8s backend
https://github.com/baimamboukar/go-gin-docker-k8s
aws-ecs docker-container gin golang golang-examples grafana-dashboard k6s k8s prometheus
Last synced: 8 months ago
JSON representation
Small backend example built using Go Gin Docker and K8s backend
- Host: GitHub
- URL: https://github.com/baimamboukar/go-gin-docker-k8s
- Owner: baimamboukar
- License: mit
- Created: 2023-12-22T23:15:29.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-30T18:47:44.000Z (almost 2 years ago)
- Last Synced: 2025-01-30T17:31:09.060Z (8 months ago)
- Topics: aws-ecs, docker-container, gin, golang, golang-examples, grafana-dashboard, k6s, k8s, prometheus
- Language: Go
- Homepage: https://go-gin-docker-k8s.vercel.app
- Size: 34.1 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Go-Gin-Docker-K8s
[](https://github.com/baimamboukar/go-gin-docker-k8s/actions/workflows/main.yaml)[](https://golang.org/) • [](YOUR_POSTMAN_API_COLLECTION_URL) • [](YOUR_VERCEL_DEPLOYMENT_URL) • [](https://www.postgresql.org/) •[](https://aws.amazon.com/) • [](https://kubernetes.io/) • [](https://www.docker.com/) • [](PROMETHEUS_LINK) • [](GRAFANA_LINK)
A backend example written in Go and the Gin web framework. The project includes a Dockerfile and Kubernetes configurations for deployment.
## Overview
This project serves as a simple backend example. It is built using the **Go programming language** with the **Gin web framework**, **Dockerized** and orchestrated using **K8s**, and delpoyed to **AWS ECS**. This backend utilizes a **Vercel-hosted** **PostgreSQL** database, and **Gorm** is employed for managing database services. The project also includes a **Makefile** for running common commands, **VS Code extensions** for enhancing the development experience, and a **CI/CD workflow** for automating the development process. The **Postman API documentation** is also included.
> [!NOTE]
> As example application for the REST APIs, the APIs are used to managed startup and tech companies. It is somehow more original than classic TODO APIs## Table of Contents
1. [Installation](#installation)
2. [Configuration](#configuration)
3. [Usage](#usage)
4. [Middlewares](#middlewares)
- [Auth Middleware](#auth-middleware)
- [Logger Middleware](#logger-middleware)
5. [Kubernetes](#kubernetes)
6. [Makefile](#makefile)
7. [VS Code Extensions](#vs-code-extensions)
8. [CI/CD Workflow](#cicd-workflow)
9. [API Documentation](#api-documentation)
10. [Contributing](#contributing)
11. [License](#license)
12. [Acknowledgments](#acknowledgments)## Installation
Follow these steps to set up the project locally.
- Clone the repository
```bash
git clone https://github.com/baimamboukar/go-gin-docker-k8s.git
```
- Navigate to the project directory
```bash
cd go-gin-docker-k8s
```### Install dependencies
```bash
make install
```### Configuration
The project uses environment variables for configuration. Copy the provided .env.example file to .env and update the values accordingly.
```bash
cp .env.example .env.local
# Update .env file with appropriate values
```### Usage
Run the following command to start the application locally.```bash
make run
```### Middlewares
- Auth Middleware
- Logger Middleware### Kubernetes Configs
kubectl apply -f kubernetes/### API Documentation
The API documentation is done using Postman.### Contributing
Contributions are welcome. Feel free to open a pull request or branch from this project.### License
This project is licensed under the MIT LICENSE