Files
worktimeBot/Dockerfile
db123 8616ed0867 feat: multi-user isolation and graceful shutdown
- Add chat_id to events, settings, and days_off for per-user data
- Add proper graceful shutdown (signal handling, WaitGroup)
- Separate polling and webhook modes with goroutine management
- Add schema migration from single-user to multi-user schema
- Refactor handlers with shared actionFunc pattern (msg + callback)
- Fix schema path for Docker deployment (/app/db/schema.sql)
- Remove emoji from output text for cleaner formatting
2026-06-24 00:14:41 +03:30

26 lines
484 B
Docker

FROM golang:1.26.4-alpine AS builder
WORKDIR /src
ARG HTTP_PROXY
ARG HTTPS_PROXY
ENV HTTP_PROXY=${HTTP_PROXY}
ENV HTTPS_PROXY=${HTTPS_PROXY}
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -o /usr/local/bin/worktime-bot ./cmd/bot/
FROM alpine:3.18
RUN apk add --no-cache ca-certificates tzdata
WORKDIR /data
COPY --from=builder /usr/local/bin/worktime-bot /usr/local/bin/worktime-bot
COPY db/schema.sql /app/db/schema.sql
VOLUME ["/data"]
CMD ["worktime-bot"]