Skip to content

Commit

Permalink
README + first release attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
tuck1s committed Mar 3, 2020
1 parent 4008755 commit 5372036
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ trk_queue.sh
example*.eml
smt.code-workspace
debug.test
linktool


70 changes: 70 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
# None

builds:
- main: ./cmd/acct_etl/acct_etl.go
id: "acct_etl"
binary: acct_etl
goos:
- linux
- darwin
- windows
- freebsd

- main: ./cmd/feeder/feeder.go
id: "feeder"
binary: feeder
goos:
- linux
- darwin
- windows
- freebsd

- main: ./cmd/tracker/tracker.go
id: "tracker"
binary: tracker
goos:
- linux
- darwin
- windows
- freebsd

- main: ./cmd/wrapper/wrapper.go
id: "wrapper"
binary: wrapper
goos:
- linux
- darwin
- windows
- freebsd

- main: ./cmd/linktool/linktool.go
id: "linktool"
binary: linktool
goos:
- linux
- darwin
- windows
- freebsd

archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64

checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
34 changes: 21 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,34 @@ Open and click tracking modules for PMTA and SparkPost Signals:

Click above links for command-specific README.

## Pre-requisites
- Git & Golang - installation tips [here](#installing-git-golang-on-your-host)
- Redis - installation tips [here](#installing-redis-on-your-host)
- NGINX - installation tips [here](#installing-and-configuring-nginx-proxy)
# Install
First, check you have the the pre-requisites ([installation tips](#pre-requisites)):

- Git & Golang
- Redis
- NGINX

# Build project from source
First, check you have the the [Pre-requisites](#pre-requisites). If you don't have `$GOPATH` set already, do:
If you don't have `$GOPATH` set already:
```
cd ~
cd /home/ec2-user/
mkdir go
export GOPATH=/home/ec2-user/go # change this to suit the directory you just made
```

Get this project (and its dependent libraries), and build them in place
# Build project from source
Get this project (and its dependent libraries):

```
go get github.com/tuck1s/sparkypmtatracking
```

Compile binaries, which will be placed in the main project folder:
```
cd sparkypmtatracking
./build.sh
```

Run the `./build.sh` script included in the project, to build each app.
You can now run a command with (e.g.) ` ./linktool -h`.

# Run
Script [start.sh](start.sh) is provided as a starting point for you to customise, along with an example [cronfile](cronfile) that can be used to start services on boot:
Expand All @@ -55,15 +61,16 @@ or `crontab -e` then paste in cronfile contents.
The project includes built-in tests as per usual Go / Travis CI / Coveralls practices.

---

# Pre-requisites

## Git, Golang
Your package manager should provide installation for these, e.g.
## Git and Golang
Your package manager should provide easy installation for these, e.g.
```
sudo yum install -y git go
```

---

## Redis on Amazon Linux
```
sudo amazon-linux-extras install epel
Expand All @@ -80,13 +87,14 @@ redis-cli PING
```
you should see `PONG`.

---
## NGINX
This can be used to protect your open/click tracking server. The [example config file](etc/nginx/conf/server_example.conf) in this project uses the following Nginx features/modules:
- http-ssl
- http-v2
- headers-more

### NGINX yum/EPEL/webtatic install on Amazon Linux
### yum/EPEL/webtatic install on Amazon Linux
If you have access to the EPEL and Webtatic repos on your platform, you can use `yum`-based install to get Nginx with added modules:
```
sudo yum update -y
Expand Down
2 changes: 1 addition & 1 deletion cmd/wrapper/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# wrapper
This is an SMTP proxy service that accepts incoming messages from your downstream client, applies engagement-tracking (wrapping links and adding open tracking pixels) and relays on to an upstream server.
SMTP proxy service that accepts incoming messages from your downstream client, applies engagement-tracking (wrapping links and adding open tracking pixels) and relays on to an upstream server.

TLS with your own local certificate/private key is supported.

Expand Down

0 comments on commit 5372036

Please sign in to comment.