update default config and create Dockerfile
This commit is contained in:
parent
af77d3296b
commit
d01c975f5a
22
Dockerfile
Normal file
22
Dockerfile
Normal 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"]
|
2
main.go
2
main.go
@ -21,7 +21,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
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")
|
initdb = flag.Bool("initdb", false, "initialize bot database")
|
||||||
githash string
|
githash string
|
||||||
buildstamp string
|
buildstamp string
|
||||||
|
Loading…
Reference in New Issue
Block a user