Categorygithub.com/distributed-containers-inc/sanic
modulepackage
0.1.0
Repository: https://github.com/distributed-containers-inc/sanic.git
Documentation: pkg.go.dev

# README

Go Report Card

Sanic Build

Sanic is an all-in-one tool to build, test, and deploy software organized in a Monorepo, where:

  1. The only things to be built are distinct Docker services with single Dockerfiles
  2. Deployment is done with Kubernetes
  3. Unit tests are stored in Dockerfiles in a folder named "dockerfiles" in each service

Requirements

  1. A recent docker client installed, and docker daemon running (i.e., "docker run" should work)
  2. Access to docker without needing sudo every time, e.g.., a sudoers NOPASSWD entry, being in the docker group, or running applicable sanic commands as root. See Manage Docker as a non-root user
  3. kubectl installed

Examples

Timestamp as a Service

A simple app which consists of three Docker services: A Python Flask api server and web server, and a Redis container

To try it out, clone this repository somewhere, then, in a bash shell:

  1. GO111MODULE=on go install
  2. cd examples/timestamp-as-a-service
  3. sanic env dev
  4. sanic deploy (to start the local environment, this may take a while. Note the URL printed at the end)
  5. sanic build --push (to build and push the images)
  6. sanic kubectl get po (to list the running pods in the new cluster)
  7. sanic kubectl delete po --all (to force kubernetes to check if new pods have been created, avoiding waiting a minute after building)
  8. Navigate to the URL that was printed in step #4 to see the deployed webserver!

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author