update

command
v2.9.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

README

Update

Update is a small go http server and script which maintains a local server upto date.

Overview

  • main.go - is a small net/http server which handles updates

    • Runs on port :9000
    • Returns latest commit, release and image at GET /update
    • Processes webhook updates at POST /update
    • Calls update.sh when there are any git updates
  • update.sh - a small script which updates local code

    • pulls latest go-micro
    • pulls latest micro
    • calls /etc/init.d/micro restart

Usage

Setup webhooks in dockerhub and in github to point to your /update endpoint

Additionally set a github secret and pass via env var

GITHUB_WEBHOOK_SECRET=foobar go run main.go

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL