#5095·hatchet

[FEAT] Lite image: build the migration DSN from DATABASE_POSTGRES_* when DATABASE_URL is not set

Author: HardballkingCreated Sep 30, 2026Updated Sep 30, 2026
Labelsenhancement

Is your feature request related to a problem? Please describe. If the lite version is run and the DATABASE_URL is not set the migration fails.

Describe the solution you'd like Build the DATABASE_URL from the existing vars

DATABASE_POSTGRES_HOST, DATABASE_POSTGRES_PORT, DATABASE_POSTGRES_USERNAME, DATABASE_POSTGRES_PASSWORD, DATABASE_POSTGRES_DB_NAME, DATABASE_POSTGRES_SSL_MODE

basically this

if [ -z "${DATABASE_URL:-}" ]; then DATABASE_URL="postgres://${DATABASE_POSTGRES_USERNAME:-hatchet}:${DATABASE_POSTGRES_PASSWORD:-hatchet}@${DATABASE_POSTGRES_HOST:-127.0.0.1}:${DATABASE_POSTGRES_PORT:-5431}/${DATABASE_POSTGRES_DB_NAME:-hatchet}?sslmode=${DATABASE_POSTGRES_SSL_MODE:-disable}" ./hatchet-migrate else ./hatchet-migrate fi

Describe alternatives you've considered setting the DATABASE_URL but this is inconsistent with the docs

Additional context


Last I checked, I had a pulse — but the cholesterol is telling me otherwise.

AI Disclosure
  • I acknowledge that an LLM was used in the creation of this Issue, in accordance with Hatchet's AI_POLICY.md.
  • Details: [e.g. scanning documentation, solution brain-storming]