- GenerateMonthlyReport now takes explicit Gregorian start/end range, computed via monthGregorianRange, so Jalali/Hijri months spanning two Gregorian months are fully covered in exports. - Added loadLocation helper (UTC fallback on error) and replaced all 11 ignored-error call sites in handlers + export. - Added periodicCleanup goroutine in NewHandler to prevent unbounded growth of the rateLimit map. - schemaPath is now read from SCHEMA_PATH env var (init), defaulting to /app/db/schema.sql. - Migrated sendDayView to use sendOrEdit helper, removing duplicated send/edit branching. - Removed dead code: userYearMonthToGregorian (unused), the old startOffset function (replaced). - Updated README with calendar docs, new env vars, full project tree. - Updated .env.example and docker-compose.yml with SCHEMA_PATH. - Simplified Makefile: added fmt, tidy, check, run-dev targets; removed broken Make-glob prerequisite pattern.
28 lines
564 B
YAML
28 lines
564 B
YAML
services:
|
|
worktime-bot:
|
|
build:
|
|
context: .
|
|
args:
|
|
HTTP_PROXY: http://192.168.100.2:10808
|
|
HTTPS_PROXY: http://192.168.100.2:10808
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- BOT_TOKEN=${BOT_TOKEN}
|
|
- HTTP_PROXY=${HTTP_PROXY-}
|
|
- HTTPS_PROXY=${HTTPS_PROXY-}
|
|
- DB_PATH=/data/db.sqlite3
|
|
- SCHEMA_PATH=${SCHEMA_PATH:-/app/db/schema.sql}
|
|
- TZ=Asia/Tehran
|
|
volumes:
|
|
- worktime_data:/data
|
|
|
|
networks:
|
|
default:
|
|
name: proxy_net
|
|
external: true
|
|
|
|
volumes:
|
|
worktime_data:
|
|
driver: local
|