diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..28c0a94 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM golang:1.18-alpine as builder +RUN apk add --no-cache gcc musl-dev +RUN mkdir -p /build +COPY . /build +WORKDIR /build +RUN go build -a -o bot + +FROM alpine:3.16 +COPY --from=builder /build/bot /app/bot +WORKDIR /app +RUN mkdir -p /app/data +ENTRYPOINT ["./bot"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..e8da929 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +services: + bot: + image: pischule/go-mention-all-bot + restart: unless-stopped + volumes: + - ./data:/app/data + environment: + TELEGRAM_TOKEN: "${TELEGRAM_TOKEN}" \ No newline at end of file