-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
60 lines (53 loc) · 1.72 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
version: '2.1'
services:
# Run the release process.
goreleaser:
extends: base
environment:
- GOPATH=/go
- GITHUB_TOKEN
entrypoint: [ "goreleaser" ]
command: ""
# Lint the codebase
lint:
extends: base
entrypoint: [ "gometalinter", "--vendor", "--config=gometalinter.json", "--deadline=60s"]
command: "./..."
# Build rig, dropping off a working binary in build/darwin/rig.
compile:
extends: base
command: go build -o build/${GOOS:-darwin}/rig cmd/main.go
environment:
GOOS: ${GOOS:-darwin}
GOARCH: ${GOARCH:-amd64}
CGO_ENABLED: 0
# Install project dependencies.
install:
extends: base
entrypoint: [ "dep", "ensure" ]
command: ""
# Update project dependencies.
# Will update all if no arguments are provided. To update a particular package use:
# docker-compose run --rm update [PACKAGENAME]
update:
extends: base
entrypoint: [ "dep", "ensure", "-update" ]
command: ""
# Foundational service to run commands within the container.
base:
build: .
command: /usr/bin/env sh
network_mode: bridge
environment:
# /go is the default GOPATH in the Docker image.
GOPATH: ${OUTRIGGER_GOPATH:-/go}
volumes:
# rig dependencies are not in a tidy sub-directory, so all global golang
# packages are found in the same directory. This volume mount persists
# them in general as a sort of cache.
#
# This does not address version mismatches between packages, so is a
# temporary/brittle workaround.
- /data/golang/cache:${OUTRIGGER_GOPATH:-/go}/src
- .:${OUTRIGGER_GOPATH:-/go}/src/github.com/phase2/rig
working_dir: ${OUTRIGGER_GOPATH:-/go}/src/github.com/phase2/rig