- Before bringing up the stack, check if the agent-db volume exists but is missing the expected database (left from a previous broken run with wrong POSTGRES_DB). Offer to wipe and re-init automatically. - After docker compose up, wait for pg_isready then run `alembic upgrade head` inside the agent container so tables are created before the agent attempts to use them. - Restart agent-service after migrations so it connects to a fully initialized database on its first attempt. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
19 KiB
19 KiB