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

Commit

Permalink
split formulas and add dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jerson committed Sep 28, 2019
1 parent 037add9 commit fea113f
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 4 deletions.
35 changes: 34 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,24 @@ changelog:
- "^docs:"
- "^test:"
archives:
- replacements:
- id: pgrokd
builds:
- pgrokd
name_template: "pgrokd_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
format_overrides:
- goos: windows
format: zip
- id: pgrok
builds:
- pgrok
name_template: "pgrok_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
replacements:
darwin: Darwin
linux: Linux
windows: Windows
Expand All @@ -59,6 +76,8 @@ archives:
format: zip
brews:
- name: pgrok
ids:
- pgrok
github:
owner: jerson
name: homebrew-tap
Expand All @@ -70,3 +89,17 @@ brews:
description: "Introspected tunnels to localhost a fork from pgrok."
test: |
system "#{bin}/pgrok -v"
- name: pgrokd
ids:
- pgrokd
github:
owner: jerson
name: homebrew-tap
commit_author:
name: Gerson Alexander Pardo Gamez
email: [email protected]
folder: Formula
homepage: "https://github.com/jerson/pgrok"
description: "Introspected tunnels to localhost a fork from pgrok."
test: |
system "#{bin}/pgrokd -v"
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM jerson/go:1.13 AS builder

ENV WORKDIR /app
WORKDIR ${WORKDIR}

COPY . .
RUN make deps
RUN make build

FROM jerson/base:1.2

LABEL maintainer="[email protected]"

ENV BUILDER_PATH /app
ENV WORKDIR /app
WORKDIR ${WORKDIR}

COPY --from=builder ${BUILDER_PATH}/pgrok /usr/local/bin/pgrok
COPY --from=builder ${BUILDER_PATH}/pgrokd /usr/local/bin/pgrokd

CMD ["pgrok"]
17 changes: 15 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
REGISTRY?=jerson/pgrok
APP_VERSION?=latest
.PHONY: default server client deps fmt clean all release-all assets client-assets server-assets contributors

default: bin/go-bindata all
default: bin/go-bindata build

deps: assets
go get -d -v ./...
Expand Down Expand Up @@ -33,7 +35,7 @@ server-assets: bin/go-bindata
-o=server/assets/all.go \
assets/server/...

all: fmt client server
build: fmt client server

clean:
go clean -i -r ./...
Expand All @@ -42,3 +44,14 @@ clean:
contributors:
echo "Contributors to pgrok, both large and small:\n" > CONTRIBUTORS
git log --raw | grep "^Author: " | sort | uniq | cut -d ' ' -f2- | sed 's/^/- /' | cut -d '<' -f1 >> CONTRIBUTORS

registry: registry-build registry-push

registry-build:
docker build --pull -t $(REGISTRY):$(APP_VERSION) .

registry-pull:
docker pull $(REGISTRY):$(APP_VERSION)

registry-push:
docker push $(REGISTRY):$(APP_VERSION)
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,22 @@
# pgrok - Introspected tunnels to localhost
### ”I want to expose a local server behind a NAT or firewall to the internet.”

# Install
# Install client

Install supports **Linux** and **MacOS** with **homebrew**
```bash
brew install jerson/tap/pgrok
```

# Install server

Install supports **Linux** and **MacOS** with **homebrew**
```bash
brew install jerson/tap/pgrokd
```

or you can just download it from download section

# Download
just download in [Release section](https://github.com/jerson/pgrok/releases)

Expand Down

0 comments on commit fea113f

Please sign in to comment.