Skip to content
This repository has been archived by the owner on Mar 2, 2022. It is now read-only.

Commit

Permalink
Update Dockerfile to run server command by default
Browse files Browse the repository at this point in the history
Use goreleaser build in simple CI to check goreleaser each time
  • Loading branch information
jlarfors committed Sep 14, 2021
1 parent 699b5b7 commit e292c9f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
args: release
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
9 changes: 6 additions & 3 deletions .github/workflows/simple.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## workflow for running the build and unit tests

on:
# run this workflow on main branch or a PR
# run this workflow on any branch or a PR
push:
branches:
- "**"
Expand Down Expand Up @@ -53,5 +53,8 @@ jobs:
${{ runner.os }}-go-
- name: Test
run: go test -failfast ./...
- name: Build
run: go build -o build/bubbly .
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: build
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ RUN go build -tags ui -o /go/bin/bubbly
FROM gcr.io/distroless/base-debian10

# Copy our static executable.
COPY --from=builder /go/bin/bubbly go/bin/bubbly
COPY --from=builder /go/bin/bubbly /bubbly

# Use an unprivileged user.
USER nonroot:nonroot

ENTRYPOINT ["go/bin/bubbly"]
# 4223 NATS service
# 8111 bubbly agent
# 8222 NATS HTTP
EXPOSE 4223 8111 8222
EXPOSE 8111
ENTRYPOINT ["/bubbly"]
CMD ["server"]


7 changes: 2 additions & 5 deletions Dockerfile.goreleaser
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@ FROM gcr.io/distroless/base-debian10
# Copy the static executable built by goreleaser
COPY bubbly /bubbly

# Bubbly makes use of these TCP ports:
# 4223 NATS service
# 8111 bubbly agent
# 8222 NATS HTTP
EXPOSE 4223 8111 8222
EXPOSE 8111

# Run as unprivileged user
USER nonroot:nonroot

ENTRYPOINT ["/bubbly"]
CMD ["server"]

0 comments on commit e292c9f

Please sign in to comment.