huma-build

command module
v0.0.0-...-1c34c8c Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2020 License: MIT Imports: 7 Imported by: 0

README

Huma Build

A Docker build helper for Huma.

Features

Usage

Usage requires two files: a .huma.yaml configuration and a Dockerfile. Examples:

service: your-service
command: go test && go install
cli:
  name: your-service-cli
  command: go build
sdk-languages:
  - go
  - python
  - javascript

Note that CLI support requires a cli folder with a main.go that generates all needed code via go generate.

FROM danielgtaylor/huma-build as build
COPY . .
RUN huma-build

FROM alpine as deploy
WORKDIR /service
COPY --from=build /go/bin/your-service /usr/bin/
COPY --from=build /huma/out/*.zip ./downloads/
ENTRYPOINT ["your-service"]

You can then build and run the service!

# Build it!
$ docker build -t your-service .

# Run it!
$ docker run your-service

Check it out at http://localhost:8888/docs.

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