Skip to content

Commit 1134b25

Browse files
committed
add instructions
1 parent 8a49713 commit 1134b25

2 files changed

Lines changed: 36 additions & 9 deletions

File tree

Makefile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
build:
22
go build -o bin/segment-proxy
33

4+
server:
5+
go run main.go
6+
47
test:
5-
go test -v -cover
8+
go test -v -cover ./...
69

710
docker:
8-
docker build -t segment-proxy .
9-
docker run --publish 6060:8080 --name segment-proxy --rm segment-proxy
11+
docker build -t segment/proxy .
12+
13+
docker-push:
14+
docker push segment/proxy
1015

11-
.PHONY: build test docker
16+
.PHONY: build server test docker docker-push

README.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,34 @@
22

33
Proxies requests to the Segment CDN and Tracking API.
44

5-
Available as a docker container that can be hosted by customers.
5+
# CLI
66

7-
# Why?
8-
9-
For example, you could host this on your zero rated domain so users don't get charged network fees for analytics data.
7+
```
8+
Usage of proxy:
9+
-debug
10+
debug mode
11+
-port string
12+
bind address (default "8080")
13+
```
1014

1115
# Usage
1216

13-
Run `make docker`.
17+
### Via Source
18+
19+
1. Clone the repo `git clone git@github.com:segmentio/segment-proxy.git`.
20+
2. Run `make build run`.
21+
22+
### Via Golang
23+
24+
1. Run `go get github.com/segmentio/segment-proxy`.
25+
2. Run `segment-proxy`.
26+
27+
### Via prebuilt binaries.
28+
29+
1. Run `wget https://github.com/segmentio/segment-proxy/releases/download/1.0.0/proxy`.
30+
2. Run `chmod +x proxy`.
31+
3. Run `./proxy`.
32+
33+
### Via Docker
34+
35+
1. Run `docker run segment/proxy`.

0 commit comments

Comments
 (0)