-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update DB creation strategy, Dockerfile and build.
- Loading branch information
gencebay-demir
committed
Dec 1, 2020
1 parent
9fd6877
commit f72e509
Showing
11 changed files
with
80 additions
and
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.db | ||
*.exe |
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,6 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.db | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
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 |
---|---|---|
@@ -1,17 +1,25 @@ | ||
FROM golang:1.9.2 as builder | ||
WORKDIR /go/src/github.com/gencebay/httplive/ | ||
RUN go get -d -v github.com/gin-gonic/gin | ||
RUN go get -d -v github.com/boltdb/bolt | ||
RUN go get -d -v github.com/urfave/cli | ||
RUN go get -d -v github.com/gorilla/websocket | ||
COPY . . | ||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app . | ||
|
||
FROM nginx:alpine | ||
ENV APPDIRPATH /go/src/github.com/gencebay/httplive/ | ||
FROM golang:1.15.5-alpine as builder | ||
|
||
WORKDIR /src/app | ||
|
||
ENV CGO_ENABLED=0 | ||
|
||
COPY . . | ||
|
||
RUN GOOS=linux go build -a -installsuffix cgo -o httplive . | ||
|
||
FROM alpine:3.7 | ||
|
||
WORKDIR /src/app | ||
|
||
EXPOSE 5003 | ||
|
||
VOLUME /src/app | ||
|
||
ENV GIN_MODE release | ||
RUN apk --no-cache add ca-certificates | ||
WORKDIR ${APPDIRPATH} | ||
COPY --from=builder ${APPDIRPATH}/app . | ||
|
||
ENTRYPOINT ["./app"] | ||
COPY --from=builder /src/app/httplive . | ||
|
||
RUN chmod +x /src/app/httplive | ||
|
||
ENTRYPOINT ["./httplive"] |
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 |
---|---|---|
@@ -1,14 +1,19 @@ | ||
module github.com/gencebay/httplive | ||
|
||
go 1.15 | ||
|
||
require ( | ||
github.com/boltdb/bolt v1.3.1 | ||
github.com/gin-contrib/sse v0.0.0-20190125020943-a7658810eb74 // indirect | ||
github.com/gin-gonic/gin v1.3.0 | ||
github.com/golang/protobuf v1.2.0 // indirect | ||
github.com/gorilla/websocket v1.4.0 | ||
github.com/json-iterator/go v1.1.10 // indirect | ||
github.com/mattn/go-isatty v0.0.4 // indirect | ||
github.com/mitchellh/gox v1.0.1 // indirect | ||
github.com/ugorji/go/codec v0.0.0-20190128213124-ee1426cffec0 // indirect | ||
github.com/urfave/cli v1.20.0 | ||
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3 // indirect | ||
gopkg.in/go-playground/validator.v8 v8.18.2 // indirect | ||
gopkg.in/yaml.v2 v2.2.2 // indirect | ||
) |
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
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
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