arthurdotwork / goboiler

Goboiler is my personal golang boilerplate for services & APIs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Goboiler

Goboiler is my personal golang boilerplate for services & APIs. It uses the following packages:

Getting started

Prerequisites

Installation

  1. Clone the repository
git clone github.com/arthureichelberger/goboiler
  1. Install dependencies
task install
  1. Start the associated services
docker-compose up -d
  1. Run the migrations
task migrate:fresh
  1. Run the server
task run

Usage

Run the server

task run

Run the tests

task test # also resets the database

Run the linter

task lint

Run the migrations

task migrate:up # to run the next migrations
task migrate:down # to revert the database
task migrate:fresh # to revert the database and run all the migrations

Create a new migration

task migrate:new -- {{migration_name}} # ex: create_users_table

Build the docker image

task docker:package

Intended usage

This boilerplate is mainly designed for deployment in Kubernetes with a PostgreSQL database. Therefore, certain technical decisions were made, particularly regarding liveness and readiness probes.

About

Goboiler is my personal golang boilerplate for services & APIs


Languages

Language:Go 87.0%Language:Shell 9.1%Language:Dockerfile 3.9%