diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8503468 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM golang:alpine as builder + +RUN apk add --no-cache \ + git + +WORKDIR /app + +ARG COMMIT=latest + +RUN GOBIN=/app go install git.siteop.biz/chtwrs/chirpnest@$COMMIT + +FROM alpine:latest + +RUN apk add --no-cache \ + libstdc++ + +WORKDIR /app/ + +# Copy the Pre-built binary file from the previous stage +COPY --from=builder /app/chirpnest . +# Command to run the executable +CMD ["./chirpnest"] diff --git a/main.go b/main.go index 82492b3..a1a4ba5 100644 --- a/main.go +++ b/main.go @@ -21,7 +21,7 @@ import ( ) var ( - config = flag.String("config", "config.json", "config file path") + config = flag.String("config", "./data/config.json", "config file path") initdb = flag.Bool("initdb", false, "initialize bot database") githash string buildstamp string