Giter Club home page Giter Club logo

go-pull's Introduction

Go Pull

A super basic deployment system based on GitHub Releases (not meant for production).

Every hour, this will pull the latest GitHub Releases from your project. If there is a new release out, it will pull it and restart the running process to reflect the updates.

THIS IS NOT MEANT FOR PRODUCTION.

Setting it up is easy. First, create a .env file with the following items filled:

PIPELINE_GITHUB_TOKEN=<GITHUB PAT>
PIPELINE_RELEASES_API=<GITHUB PROJECT URL>/releases
PIPELINE_BUILD_OUT=./app

The system will automatically make ./app group 0700, giving the owner (whoever runs the Go script) access to READ / WRITE / EXECUTE the app, and restricts all other access from group users or regular users.

Production Readiness

As of now, this isn't really "prod" ready.. it technically could work, but its not super secure. Some ideas to make it prod ready are:

  • Automatically run the built binary as a different user
  • Sign binaries and put it in the Release description
    • Each time a new release is found, confirm the signature matches the binary present. If it doesn't, reject it.
    • This will at least confirm its YOU that is deploying stuff to your server. As usual, secure your d@mn signing key!
  • In production mode, only pull Releases with the "Latest" tag- no pre-releases.
  • Downtime concerns: currently, the process needs to be fully killed before proceeding. It'd be nice to somehow get both the old and new version running, and then swap the ports somehow (idk how this is possible)

go-pull's People

Contributors

kvizdos avatar

Watchers

 avatar

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.