Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: cmd/indexer docker container #574

Merged
merged 1 commit into from Feb 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
79 changes: 52 additions & 27 deletions .goreleaser.yml
@@ -1,12 +1,8 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
env:
- GO111MODULE=on
before:
hooks:
- go mod download
# - go install github.com/golang/mock/mockgen
# - go generate ./...
builds:
- id: mailchain-darwin-amd64
ldflags: -s -w -X github.com/mailchain/mailchain.Version={{.Version}} -X github.com/mailchain/mailchain.BuildDate={{.Date}} -X github.com/mailchain/mailchain.CommitHash={{ .ShortCommit }}
Expand All @@ -30,6 +26,16 @@ builds:
- linux
goarch:
- amd64
- id: indexer-linux-amd64
ldflags: -s -w -X github.com/mailchain/mailchain.Version={{.Version}} -X github.com/mailchain/mailchain.BuildDate={{.Date}} -X github.com/mailchain/mailchain.CommitHash={{ .ShortCommit }}
binary: indexer
env:
- CGO_ENABLED=0
main: ./cmd/indexer/main.go
goos:
- linux
goarch:
- amd64
- id: mailchain-windows-amd64
ldflags: -s -w -X github.com/mailchain/mailchain.Version={{.Version}} -X github.com/mailchain/mailchain.BuildDate={{.Date}} -X github.com/mailchain/mailchain.CommitHash={{ .ShortCommit }}
binary: mailchain
Expand All @@ -41,29 +47,28 @@ builds:
goos:
- windows
goarch:
- amd64

- amd64
archives:
- format: tar.gz
format_overrides:
- goos: windows
format: zip
name_template: "{{.ProjectName}}-v{{.Version}}-{{.Os}}-{{.Arch}}"
replacements:
amd64: 64bit
386: 32bit
arm: ARM
arm64: ARM64
darwin: macOS
linux: Linux
windows: Windows
openbsd: OpenBSD
netbsd: NetBSD
freebsd: FreeBSD
dragonfly: DragonFlyBSD
files:
- Readme.MD
- LICENSE
- format: tar.gz
format_overrides:
- goos: windows
format: zip
name_template: "{{.ProjectName}}-v{{.Version}}-{{.Os}}-{{.Arch}}"
replacements:
amd64: 64bit
386: 32bit
arm: ARM
arm64: ARM64
darwin: macOS
linux: Linux
windows: Windows
openbsd: OpenBSD
netbsd: NetBSD
freebsd: FreeBSD
dragonfly: DragonFlyBSD
files:
- Readme.MD
- LICENSE
checksum:
name_template: 'checksums.txt'
snapshot:
Expand Down Expand Up @@ -93,4 +98,24 @@ scoop:
name: scoop-bucket
homepage: https://mailchain.xyz
description: Secure, email-like messaging for blockchain addresses and accounts
license: MIT
license: MIT
dockers:
-
binaries: # Name templates of the built binaries that should be used.
- indexer
goos: linux # GOOS of the built binary that should be used.
goarch: amd64 # GOARCH of the built binary that should be used.
dockerfile: ./cmd/indexer/Dockerfile

image_templates:
- "mailchain/indexer:latest"
- "mailchain/indexer:{{.Version}}"

build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}/indexer"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=repository=https://github.com/mailchain/mailchain"
- "--label=homepage=https://mailchain.xyz"
4 changes: 4 additions & 0 deletions cmd/indexer/Dockerfile
@@ -0,0 +1,4 @@
FROM centurylink/ca-certs
ENTRYPOINT ["/indexer"]

add indexer /indexer