Skip to content

Commit

Permalink
Rename internal binary
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Feb 21, 2020
1 parent c6467d8 commit 834da2d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ COPY main.go .
# Run a gofmt and exclude all vendored code.
RUN test -z "$(gofmt -l $(find . -type f -name '*.go' -not -path "./vendor/*"))" \
&& go test -v ./... \
&& CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-s -w" -installsuffix cgo -o /usr/bin/producer
&& CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-s -w" -installsuffix cgo -o /usr/bin/connector

FROM alpine:3.11 as ship
RUN apk add --no-cache ca-certificates

COPY --from=build /usr/bin/producer /usr/bin/producer
COPY --from=build /usr/bin/connector /usr/bin/connector
WORKDIR /root/

CMD ["/usr/bin/producer"]
CMD ["/usr/bin/connector"]
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
# nats-connector

[![Go Report Card](https://goreportcard.com/badge/github.com/openfaas-incubator/nats-connector)](https://goreportcard.com/report/github.com/openfaas-incubator/nats-connector) [![Build
Status](https://travis-ci.com/openfaas-incubator/nats-connector.svg?branch=master)](https://travis-ci.org/openfaas-incubator/nats-connector) [![GoDoc](https://godoc.org/github.com/openfaas-incubator/nats-connector?status.svg)](https://godoc.org/github.com/openfaas-incubator/nats-connector) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Build Status](https://travis-ci.com/openfaas-incubator/nats-connector.svg?branch=master)](https://travis-ci.com/openfaas-incubator/nats-connector)
[![Go Report Card](https://goreportcard.com/badge/github.com/openfaas-incubator/nats-connector)](https://goreportcard.com/report/github.com/openfaas-incubator/nats-connector)
[![GoDoc](https://godoc.org/github.com/openfaas-incubator/nats-connector?status.svg)](https://godoc.org/github.com/openfaas-incubator/nats-connector)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![OpenFaaS](https://img.shields.io/badge/openfaas-serverless-blue.svg)](https://www.openfaas.com)

The NATS connector connects OpenFaaS functions to NATS topics.

## Building

```
export TAG=0.2.0
make build push
```
An OpenFaaS event-connector to trigger functions from NATS.

## Try it out

Expand Down Expand Up @@ -68,6 +63,15 @@ The following instructions show how to run and test `nats-connector` on Kubernet
2019-12-29T19:06:50Z 2019/12/29 19:06:50 received "test message"
```

## Building

Build and release is done via CI, but you can also build your own version locally.

```bash
export TAG=0.2.1
make build push
```

### Configuration

Configuration is by environment variable, which can be set in the Kubernetes YAML file: [yaml/kubernetes/connector-dep.yaml](./yaml/kubernetes/connector-dep.yaml)
Expand Down

0 comments on commit 834da2d

Please sign in to comment.