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
This commit is contained in:
2026-06-24 00:14:41 +03:30
parent 7aada8d118
commit 8616ed0867
7 changed files with 416 additions and 412 deletions

View File

@@ -19,7 +19,7 @@ RUN apk add --no-cache ca-certificates tzdata
WORKDIR /data
COPY --from=builder /usr/local/bin/worktime-bot /usr/local/bin/worktime-bot
COPY --from=builder /src/db/schema.sql ./db/schema.sql
COPY db/schema.sql /app/db/schema.sql
VOLUME ["/data"]
CMD ["worktime-bot"]