no message

This commit is contained in:
Roee Gadot
2021-04-28 17:54:32 +03:00
parent 00949d885a
commit b01fe9c918
5 changed files with 48 additions and 29 deletions

View File

@@ -1,16 +0,0 @@
# Files
.dockerignore
.editorconfig
.gitignore
.env.*
Dockerfile
Makefile
LICENSE
**/*.md
**/*_test.go
*.out
# Folders
.git/
.github/
build/

View File

@@ -1,29 +0,0 @@
FROM golang:1.16 AS builder
# Move to working directory (/site).
WORKDIR /build
# Copy and download dependency using go mod.
COPY go.mod go.sum ./
RUN go mod download
# Copy the code into the container.
COPY . .
# Set necessary environmet variables needed for our image and site the API server.
ENV GOOS=linux GOARCH=amd64
RUN go build -ldflags="-s -w" -o apiserver .
FROM golang:1.16
# Copy binary and config files from /site to root folder of scratch container.
COPY --from=builder ["/build/apiserver", "/"]
# Export necessary port.
EXPOSE 8899
COPY site /go/site
COPY entries.db /go/entries.db
# Command to run when starting the container.
ENTRYPOINT ["/apiserver"]

View File

@@ -41,6 +41,7 @@ func StartReadingFiles(workingDir string) {
utils.CheckErr(decErr)
for _, entry := range inputHar.Log.Entries {
time.Sleep(time.Millisecond * 250)
SaveHarToDb(*entry, "")
}
rmErr := os.Remove(inputFilePath)