mirror of
https://github.com/pischule/go-mention-all-bot.git
synced 2025-12-19 06:56:43 +00:00
add dockerfile
This commit is contained in:
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@@ -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"]
|
||||
8
docker-compose.yml
Normal file
8
docker-compose.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
services:
|
||||
bot:
|
||||
image: pischule/go-mention-all-bot
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
environment:
|
||||
TELEGRAM_TOKEN: "${TELEGRAM_TOKEN}"
|
||||
Reference in New Issue
Block a user