Refactor testing into docker file

This means a decent scale refactor but ends with our testing being much simpler

	Key changes:
		* single Dockerfile for all services
		* tests moved into docker up so don't need to be run locally
		* configurations moved to environment
This commit is contained in:
Marc Di Luzio 2020-06-11 18:16:11 +01:00
parent 99da6c5d67
commit 14424c16ca
13 changed files with 171 additions and 107 deletions

16
Dockerfile Normal file
View file

@ -0,0 +1,16 @@
FROM golang:latest
LABEL maintainer="Marc Di Luzio <marc.diluzio@gmail.com>"
WORKDIR /app
COPY . .
RUN go mod download
# For /usr/share/dict/words
RUN apt-get -q update && apt-get -qy install wamerican
# Build both executables
RUN go build -o rove-server -ldflags="-X 'github.com/mdiluz/rove/pkg/version.Version=$(git describe --always --long --dirty --tags)'" cmd/rove-server/main.go
RUN go build -o rove-accountant -ldflags="-X 'github.com/mdiluz/rove/pkg/version.Version=$(git describe --always --long --dirty --tags)'" cmd/rove-accountant/main.go
CMD [ "./rove-server" ]