Skip to content

shaxbee/todo-app-skaffold

Repository files navigation

Skaffold Todo App

Skaffold Todo App

Todo App built in Go with Skaffold deployment.

Features

  • sqlc - generate database interface and models from migrations and queries
  • openapi-generator - generate models and clients from OpenAPI spec
  • dockertest - spin up postgres in docker for integration tests

Prerequisites

Fetch submodules

git submodule update --init --recursive

macOS

Install Docker with brew:

brew cask install docker

Development

Bootstrap

Setup local cluster running in Docker using kind. Postgres will be installed in this step to avoid recreating database on each run.

make bootstrap

Run

Skaffold will build Docker images and deploy the stack to the cluster. Application will run in the background.

make run

Debug

Run the backend in debugging mode.

make debug

Connect to running backend using todo-service launch configuration in VSCode.

Develop

Continously develop stack:

make dev

If files change the affected artifacts will be built and re-deployed automatically.

Following ports are exposed when running:

  • :8080 API
  • :9000 API Documentation
  • :5432 Postgres

Test

Open http://localhost in the browser. API endpoints can be tested directly from Swagger UI.

open http://localhost

Cleanup

Destroy the cluster:

make clean-kind

All data in Postgres will be lost.

Full cleanup including downloaded tools:

make clean

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published