The Dockerfile installs Chromium via `playwright install chromium`, but
Playwright MCP defaults to Chrome (the branded Google build) when no
browser is specified. On a fresh container the launch fails and the
agent falls back to installing Chrome at runtime. Baking the env var
into the image keeps installed browser and default in sync.
Install tzdata so TZ resolves, default SECRETARY_TIMEZONE to
Europe/Warsaw, and pass it through as the container-wide TZ so OS
timestamps (logs, date, cron) match the app's scheduling zone.
Two additions:
- ENV PATH prepends /app/node_modules/.bin so `pi` is on PATH inside
the container (previously `docker exec ... pi ...` failed with
"command not found").
- `npm install -g @anthropic-ai/claude-code` so the `claude` CLI is
available — pi-claude-code-provider shells out to it.
The node:24 base image sets ENTRYPOINT ["docker-entrypoint.sh"]. We
override that script but the ENTRYPOINT still runs on every start, so
compose's `command:` was being handed to our script as args (and
silently ignored — we always exec'd `node dist/main.js`). That made the
`sleep infinity` override useless: the crash-looping app kept running.
Fix by execing "$@" when args are present so compose overrides work,
and set CMD to ["node","dist/main.js"] so normal (no-override) starts
still boot the app.
The Pi coding agent stores installed packages under $PI_CODING_AGENT_DIR
(=/pi-agent in the image), which is a volume — so anything installed at
build time is masked at runtime. Wrap the CMD in an entrypoint that runs
`pi install npm:pi-claude-code-provider` the first time the volume is
seen and drops a marker so subsequent starts are a no-op.
Docker build verified locally (docker build -t volcanic-secretary .
succeeded on this machine). Step 6's manual end-to-end checklist
against a real Telegram bot was not run in this environment (no bot
token or owner id available); the checklist is kept in the README's
Tests section for the owner to run before relying on this in
production.
Claude-Session: https://claude.ai/code/session_01JtuZTCMW9TyogEmBgGf8JT