GithubHelp home page GithubHelp logo

mygo-api's Introduction

mygo-api

Basic api using go language, docker and github actions CI workflow. Every commit and push to main branch, triggers a continuous integration (CI) pipeline via github actions, which in turn automatically build a docker image and pushed to docker hub.

Run locally

using docker:

  docker build -t mygo-api .   
  docker run -it -p 8080:8080 mygo-api

using docker-compose:

  docker-compose up --build

Available endpoints

  • /hello
  • /health
  • /metadata

Running test

  go test ./...

Deployment secrets

  • Create a personal access token by going to Settings -> Developer settings -> Personal access tokens and name it: CI_GITHUB_TOKEN
  • Copy the generated code and paste it on repo's Settings -> Secrets -> Value text area after clicking on "New repository secret" button
  • Create additional secrets for docker hub details: DOCKER_USERNAME, DOCKER_PASSWORD

API docker image output

eibayan/mygo

Optional: Kubernetes setup using kind on mac

  brew install kind
  kind create cluster
  kubectl cluster-info --context kind-kind
  kubectl get pods
  kubectl get services 

Additional challenges

  • Adding more tests coverage
  • Add build matrix for different environment (dev, stage, uat, prod)
  • Trigger dev deployment to actual cloud provider
  • Setup infrastructure as code (IAC) using Cloudformation Template, CDK or Terraform
  • Setting up ArgoCD

mygo-api's People

Contributors

eibay avatar

Stargazers

Roman avatar

Watchers

 avatar  avatar

Forkers

elgohr-update

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.