update default config and create Dockerfile

This commit is contained in:
shoopea 2021-10-26 22:20:10 +08:00
parent af77d3296b
commit d01c975f5a
2 changed files with 23 additions and 1 deletions

22
Dockerfile Normal file
View File

@ -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"]

View File

@ -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