diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..13e2de4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM golang:1.25-alpine AS build +WORKDIR /src + +COPY go.mod go.sum ./ +RUN go mod download + +COPY main.go ./ +RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /pois . + +FROM gcr.io/distroless/static-debian12:nonroot +COPY --from=build /pois /pois +ENTRYPOINT ["/pois"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..a3603eb --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +# Pois + +Discord bot that automatically joins a configured voice channel. + +## Environment + +Set the required environment variables in your shell. This project does not load `.env` files. + +```bash +export DISCORD_TOKEN='your-bot-token' +export CHANNEL_ID='your-voice-channel-id' +``` + +## Binary + +```bash +go build -o pois . +./pois +``` + +## Docker + +```bash +docker build -t pois . +docker run --rm -e DISCORD_TOKEN='your-bot-token' -e CHANNEL_ID='your-voice-channel-id' pois +```