nanobox-io / nanobox-engine-golang

Engine for running Go apps with Nanobox
https://nanobox.io
MIT License
4 stars 6 forks source link
developer-tools devtools docker engine go golang nanobox

Go

This is a Go engine used to launch Go apps on Nanobox.

Usage

To use the Go engine, specify golang as your engine in your boxfile.yml.

run.config:
  engine: golang

Build Process

When building your runtime, this engine compiles code by doing the following:

> go get
> go build

These commands can be modified using the fetch and build config options

Configuration Options

This engine exposes configuration options through the boxfile.yml, a yaml config file used to provision and configure your app's infrastructure when using Nanobox. This engine makes the following options available.

Overview of Boxfile Configuration Options

run.config:
  engine: golang
  engine.config:
    # Go Settings
    runtime: go-1.8
    package: 'github.com/username/code'
    fetch: 'go get'
    build: 'go build'

runtime

Specifies which Golang runtime to use. The following runtimes are available:

run.config:
  engine: golang
  engine.config:
    runtime: go-1.8

package (required)

Specifies the path to the directory in which your code is stored. This can be a local or remote directory.

run.config:
  engine: golang
  engine.config:
    package: 'github.com/username/code'

fetch

Defines the command to run to load dependencies in the build process.

run.config:
  engine: golang
  engine.config:
    fetch: 'go get'

build

Defines the command to run to compile your code in the build process.

run.config:
  engine: golang
  engine.config:
    build: 'go build'

TODO

Help & Support

This is a Go engine provided by Nanobox. If you are running into an issue with the engine, feel free to create a new issue on this project.