Go-Gin-Docker-K8s
• • • • • • • •
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
- Installation
- Configuration
- Usage
- Middlewares
- Kubernetes
- Makefile
- VS Code Extensions
- CI/CD Workflow
- API Documentation
- Contributing
- License
- Acknowledgments
Installation
Follow these steps to set up the project locally.
git clone https://github.com/baimamboukar/go-gin-docker-k8s.git
- Navigate to the project directory
cd go-gin-docker-k8s
Install dependencies
make install
Configuration
The project uses environment variables for configuration. Copy the provided .env.example file to .env and update the values accordingly.
cp .env.example .env.local
# Update .env file with appropriate values
Usage
Run the following command to start the application locally.
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