Skip to content

Commit becabd1

Browse files
committed
Adds docker image support and migrates to go modules.
1 parent 0a9aeaf commit becabd1

File tree

171 files changed

+121
-112341
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+121
-112341
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
*.swp
22
tmp
3+
vendor
4+
bin
5+
.exe

.travis.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
language: go
2-
sudo: false
3-
4-
go:
5-
- 1.9
6-
- tip
72

83
matrix:
94
allow_failures:
105
- go: tip
6+
fast_finish: true
7+
include:
8+
- go: 1.11.x
9+
env: GO111MODULE=on
10+
- go: 1.12.x
11+
env: GO111MODULE=on
12+
- go: 1.13.x
13+
- go: tip
14+
15+
before_install:
16+
- if [[ "${GO111MODULE}" = "on" ]]; then mkdir "${HOME}/go"; export GOPATH="${HOME}/go"; fi
17+
- go mod download
18+
- if [[ "${GO111MODULE}" = "on" ]]; then export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"; fi
19+
- travis_retry go get -u golang.org/x/lint/golint
1120

12-
install:
21+
script: make test
1322

14-
script: make
23+
sudo: false

Gopkg.lock

Lines changed: 0 additions & 81 deletions
This file was deleted.

Gopkg.toml

Lines changed: 0 additions & 30 deletions
This file was deleted.

Makefile

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,30 @@
1-
all:
2-
go install ./cmd/...
1+
SHELL := /bin/bash
2+
3+
test: lint vet build
4+
5+
lint:
6+
golint -set_exit_status ./...
7+
8+
vet:
9+
go vet ./...
10+
11+
build: clean
12+
go build -v -o ./bin/executor ./cmd/executor
13+
go build -v -o ./bin/ordermatch ./cmd/ordermatch
14+
go build -v -o ./bin/tradeclient ./cmd/tradeclient
15+
16+
clean:
17+
rm -rf ./bin
18+
rm -rf ./tmp
19+
20+
# Commands for docker images.
21+
# ----------------------------
22+
build-linux:
23+
GOOS=linux GOARCH=amd64 go build -v -o ./bin/executor ./cmd/executor
24+
GOOS=linux GOARCH=amd64 go build -v -o ./bin/ordermatch ./cmd/ordermatch
25+
GOOS=linux GOARCH=amd64 go build -v -o ./bin/tradeclient ./cmd/tradeclient
26+
27+
build-docker: clean build-linux
28+
docker build -t quickfixgo/executor:latest -f ./cmd/executor/Dockerfile .
29+
docker build -t quickfixgo/ordermatch:latest -f ./cmd/ordermatch/Dockerfile .
30+
docker build -t quickfixgo/tradeclient:latest -f ./cmd/tradeclient/Dockerfile .

cmd/executor/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM golang:alpine
2+
3+
ADD config config
4+
5+
ADD bin/executor /executor
6+
7+
ENTRYPOINT ["/executor"]
File renamed without changes.

cmd/ordermatch/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM golang:alpine
2+
3+
ADD config config
4+
5+
ADD bin/ordermatch /ordermatch
6+
7+
ENTRYPOINT ["/ordermatch"]
File renamed without changes.

cmd/tradeclient/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM golang:alpine
2+
3+
ADD config config
4+
5+
ADD bin/tradeclient /tradeclient
6+
7+
ENTRYPOINT ["/tradeclient"]

0 commit comments

Comments
 (0)