Fix dockerfile to use env

master
Jonas Franz 6 years ago
parent 6f1f1a6089
commit c2332ec7d6
  1. 2
      Dockerfile
  2. 2
      bot.go

@ -5,6 +5,6 @@ WORKDIR ${GOPATH}/src/git.jonasfranz.software/JonasFranzDEV/mensabot
RUN go build
FROM alpine:3.7
ENV MENSABOT_TOKEN
COPY --from=build-env /go/src/git.jonasfranz.software/JonasFranzDEV/mensabot/mensabot /app/mensabot/mensabot
ENTRYPOINT ["/app/mensabot/mensabot"]

@ -31,7 +31,7 @@ var (
func main() {
token := os.Getenv("MENSABOT_TOKEN")
if len(token) == 0 {
println("Please add token as cli argument.")
println("Please add token as environment variable: MENSABOT_TOKEN.")
return
}
dg, err := discordgo.New(fmt.Sprintf("Bot %s", token))

Loading…
Cancel
Save