Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0446c4f
commit 53cae8e
Showing
6 changed files
with
114 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,4 @@ profile.cov | |
.env | ||
.env.* | ||
|
||
vendor | ||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
before: | ||
hooks: | ||
- go mod download | ||
builds: | ||
- id: darkroom_linux | ||
main: . | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
env: | ||
- CGO_ENABLED=1 | ||
ldflags: | ||
- -w -s | ||
- -X github.com/gojek/darkroom/internal/version.version={{ .Version }} | ||
- -X github.com/gojek/darkroom/internal/version.gitTag={{ .Tag }} | ||
- -X github.com/gojek/darkroom/internal/version.gitCommit={{ .FullCommit }} | ||
- -X github.com/gojek/darkroom/internal/version.buildDate={{ .Date }} | ||
- id: darkroom_windows | ||
main: . | ||
goos: | ||
- windows | ||
goarch: | ||
- amd64 | ||
ldflags: | ||
- -w -s | ||
- -X github.com/gojek/darkroom/internal/version.version={{ .Version }} | ||
- -X github.com/gojek/darkroom/internal/version.gitTag={{ .Tag }} | ||
- -X github.com/gojek/darkroom/internal/version.gitCommit={{ .FullCommit }} | ||
- -X github.com/gojek/darkroom/internal/version.buildDate={{ .Date }} | ||
env: | ||
- CGO_ENABLED=1 | ||
- CC=x86_64-w64-mingw32-gcc | ||
- CXX=x86_64-w64-mingw32-g++ | ||
- id: darkroom_darwin | ||
main: . | ||
goos: | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
ldflags: | ||
- -w -s | ||
- -X github.com/gojek/darkroom/internal/version.version={{ .Version }} | ||
- -X github.com/gojek/darkroom/internal/version.gitTag={{ .Tag }} | ||
- -X github.com/gojek/darkroom/internal/version.gitCommit={{ .FullCommit }} | ||
- -X github.com/gojek/darkroom/internal/version.buildDate={{ .Date }} | ||
env: | ||
- CGO_ENABLED=1 | ||
- CC=o64-clang | ||
- CXX=o64-clang++ | ||
dockers: | ||
- dockerfile: build/Dockerfile.goreleaser | ||
goos: linux | ||
goarch: amd64 | ||
image_templates: | ||
- "gojektech/darkroom:latest" | ||
- "gojektech/darkroom:{{ .Tag }}" | ||
|
||
archives: | ||
- format: tar.gz | ||
name_template: >- | ||
{{ .ProjectName }}_ | ||
{{- title .Os }}_ | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else if eq .Arch "386" }}i386 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
{{- if .Arm }}v{{ .Arm }}{{ end }} | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
checksum: | ||
name_template: "checksums.txt" | ||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- "^docs:" | ||
- "^test:" | ||
- "^website" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,25 @@ | ||
FROM golang:1.20-alpine AS builder | ||
|
||
ENV GO111MODULE=on | ||
ENV CGO_ENABLED=1 | ||
ENV GOOS=linux | ||
ENV GOARCH=amd64 | ||
|
||
WORKDIR /app | ||
COPY . . | ||
RUN apk update && apk add build-base | ||
RUN GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o darkroom main.go | ||
|
||
COPY . . | ||
|
||
RUN GOOS=$GOOS GOARCH=$GOARCH go build -ldflags="-w -s" -o darkroom main.go | ||
|
||
FROM alpine | ||
|
||
RUN apk update && apk add --no-cache ca-certificates | ||
|
||
COPY --from=builder /app/darkroom ./darkroom | ||
|
||
RUN chmod +x ./darkroom | ||
ENV PORT 3000 | ||
EXPOSE 3000 | ||
|
||
CMD ["./darkroom", "server"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters