Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Latest commit

 

History

History
75 lines (49 loc) · 1.81 KB

development.rst

File metadata and controls

75 lines (49 loc) · 1.81 KB

Development

Build

First, install Go and npm.

You can build the terrafire executable:

make -C web setup # install npm packages
make build

make build command builds javascript assets, embeds them into Go project (using go.rice), and compiles Go sources. See Makefile for details.

Update Protocol Buffer

Terrafire uses gRPC for internal communication. Proto files are placed in api directory.

Generated codes by protocol buffer are included in version control system. So, if you update proto files, run the following command and commit auto generated codes.

make proto

Development Servers

Start development servers:

go run ./cmd/terrafire server      # start server

go run ./cmd/terrafire controller  # start controller

cd web && npm start                # start npm proxy server

These servers are useful for local development and debugging.

(It is recommended to configure environment variables using direnv.)

Build With

How To Release

We use SemVer for versioning.

When you release a new version of Terrafire, just push a version tag to GitHub.

When a version tag is pushed:

  • GitHub Action goreleaser starts, and publish a GitHub release.
  • Docker Hub starts a build, and publish a docker image to Docker Hub.