From 3c6c5eb76f8a00b00a5b396c2d65e752b3093431 Mon Sep 17 00:00:00 2001 From: DeveloperDurp Date: Tue, 28 Mar 2023 19:25:02 -0500 Subject: [PATCH] update dockerfile --- Dockerfile | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index aa6b00a..d936b84 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,17 @@ -FROM node:latest -WORKDIR /usr/src/app -COPY package*.json ./ -RUN npm install -COPY . /usr/src/app -CMD [ "node", "." ] +FROM golang:latest +# Set the working directory +WORKDIR /app + +# Copy the source code into the container +COPY . . + +# Build the Go binary +RUN go build -o bot + +# Set the DISCORD_BOT_TOKEN environment variable +ENV TOKEN=${DISCORD_TOKEN} +ENV BOTPREFIX="!" + +# Run the bot binary +CMD ["./bot"] \ No newline at end of file