Git Product home page Git Product logo

capistrano-go's Introduction

Capistrano Go

Capistrano plugin that integrates Golang project tasks into capistrano deployment script.

WARNING: this capistrano plugin is still in development and may not work as expected.

Installation

Install library from rubygems:

gem install capistrano-go

Usage

Setup

Add the library to your Gemfile:

group :development do
  gem 'capistrano-go', :require => false
end

And load it into your deployment script config/deploy.rb:

require 'capistrano-go'

Add Go build task hook:

before 'deploy:restart', 'go:build'
before 'deploy:start',   'go:build'

Create a new configuration file config/go/go.rb or config/go/STAGE.rb, where stage is your deployment environment.

Example config - examples/go.rb.

Test

First, make sure you're running the latest release:

cap deploy

Then you can test each individual task:

cap go:build

Configuration

You can modify any of the following options in your deploy.rb config.

  • go_env - Set unicorn environment. Default to rails_env variable.
  • go_bin - Set go executable file. Default to go.variable.
  • go_roles - Define which roles to perform go recpies on. Default to :app.
  • go_config_path - Set the directory where go config files reside. Default to current_path/config.
  • go_config_filename - Set the filename of the go config file. Not used in multistage installations. Default to go.rb.

Multistage

If you are using capistrano multistage, please refer to Using capistrano Go with multistage environment.

Available Tasks

To get a list of all capistrano tasks, run cap -T:

cap go:Build    # Build the Go application
cap go:clean    # Clean up the Go application build

License

See LICENSE file for details.

capistrano-go's People

Contributors

snormore avatar

Watchers

 avatar  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.