Add Docker Compose and deployment documentation

This commit is contained in:
tgvpn
2026-05-21 00:29:22 +03:00
parent 626128673d
commit 20872232b7
6 changed files with 347 additions and 8 deletions
+24
View File
@@ -0,0 +1,24 @@
FROM golang:1.22-alpine AS builder
WORKDIR /app
RUN apk add --no-cache git ca-certificates
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /bot .
FROM alpine:3.20
RUN apk add --no-cache ca-certificates tzdata \
&& adduser -D -H -u 10001 bot
WORKDIR /app
COPY --from=builder /bot /app/bot
USER bot
ENTRYPOINT ["/app/bot"]