Skip to content

baimamboukar/go-gin-docker-k8s

Repository files navigation

Go-Gin-Docker-K8s

CI/CD Workflow

Go LanguagePostmanVercelPostgreSQLAWSKubernetesDockerPrometheusGrafana

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
  2. Configuration
  3. Usage
  4. Middlewares
  5. Kubernetes
  6. Makefile
  7. VS Code Extensions
  8. CI/CD Workflow
  9. API Documentation
  10. Contributing
  11. License
  12. Acknowledgments

Installation

Follow these steps to set up the project locally.

  • Clone the repository
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