Fix sync: add missing tables, Linux date, token from env

Add production and consumption table migrations. Fix sync-month.sh
to use Linux date syntax and default to port 3030. Read Eloverblik
token from ELOVERBLIK_TOKEN env var with .token file fallback.
Mount .token into Docker container.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-15 13:06:14 +01:00
co-authored by Claude Opus 4.6
parent 14b583ccb9
commit 3a319f5cf4
7 changed files with 21 additions and 4 deletions
+3 -3
View File
@@ -9,10 +9,10 @@ if [ $# -ne 1 ]; then
fi
MONTH="$1"
BASE_URL="${BASE_URL:-http://localhost:3000}"
BASE_URL="${BASE_URL:-http://localhost:3030}"
# Last day of the month (macOS date)
days=$(date -j -v+1m -v-1d -f "%Y-%m-%d" "${MONTH}-01" "+%d")
# Last day of the month
days=$(date -d "${MONTH}-01 +1 month -1 day" "+%d")
echo "Syncing $MONTH ($days days)"