-
Notifications
You must be signed in to change notification settings - Fork 3
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
acb35d5
commit 9660dfd
Showing
5 changed files
with
57 additions
and
8 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM golang:1.13 as builder | ||
|
||
WORKDIR /build | ||
ADD . /build/ | ||
|
||
|
||
ENV GOOS=linux GARCH=amd64 CGO_ENABLED=0 | ||
RUN go build -o api-server . | ||
|
||
FROM alpine:3.7 | ||
|
||
#RUN adduser -S -D -H -h /app appuser | ||
#USER appuser | ||
|
||
WORKDIR /app | ||
COPY --from=builder /build/api-server /app/api-server | ||
|
||
CMD [ "/app/api-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module github.com:nikhil-thomas/tekton-pipelines-demo.git | ||
module github.com/sthaha/vote-api-server | ||
|
||
go 1.12 | ||
go 1.13 | ||
|
||
require github.com/gin-gonic/gin v1.4.0 // indirect | ||
require github.com/gin-gonic/gin v1.4.0 |
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,22 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app: voting-api | ||
name: voting-api | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: voting-api | ||
template: | ||
metadata: | ||
labels: | ||
app: voting-api | ||
spec: | ||
containers: | ||
- image: nikhilvep/voting-api:latest | ||
name: voting-api | ||
ports: | ||
- containerPort: 8080 |
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,13 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app: voting-api | ||
name: voting-api | ||
spec: | ||
ports: | ||
- port: 8080 | ||
protocol: TCP | ||
targetPort: 8080 | ||
selector: | ||
app: voting-api |