Summary
The yeagerai/simulator-database-migration:latest image fails to boot when genlayer up --headless --numValidators 5 is run on a fresh install. The migration container exits with code 1 because its alembic configuration appears to hardcode sqlalchemy.url to localhost instead of reading DB_URL from the environment. In the docker-compose network, postgres is a service alias — not reachable at localhost from another container.
Repro
Fresh install, macOS on Apple Silicon, Docker Desktop 29.6.1, GenLayer CLI v0.39.2:
genlayer up --headless --numValidators 5
Observed
Containers after boot attempt:
genlayer-postgres-1 — starts healthy on 5432 ✅
genlayer-hardhat-1 / genlayer-webdriver-1 — healthy ✅
genlayer-database-migration-1 — starts, then exits with code 1 ❌
genlayer-jsonrpc-1 — stays in Created state (depends on migration completing) ❌
- Port 4000 never bound → RPC unreachable → CLI eventually prints "Unable to initialize the GenLayer simulator"
Migration container logs (verbatim tail):
Running migrations online
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError)
connection to server at "localhost" (::1), port 5432 failed: Connection refused
connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused
Root cause
The migration container's DB_URL env is correctly set to a value pointing at the docker service name postgres, and postgres is reachable at postgres:5432 from the same genlayer_default network (verified via docker inspect). But alembic attempts to connect to localhost:5432 inside the migration container's own namespace, where nothing is listening, so it errors with Connection refused.
The most likely cause is that alembic.ini inside the image hardcodes sqlalchemy.url = ...@localhost/... and env.py doesn't override it with DB_URL.
Fix suggestions
Either:
- Update
env.py to override the URL at runtime: config.set_main_option("sqlalchemy.url", os.environ["DB_URL"]) before running migrations
- Or publish an updated
alembic.ini that uses the service alias (postgres) as the default host
Environment
- macOS 14 (Darwin 24.6.0), Apple Silicon
- Docker Desktop 29.6.1
- GenLayer CLI v0.39.2
- Image:
yeagerai/simulator-database-migration:latest (pulled 2026-07-01)
Impact
Blocks fresh genlayer up on macOS across our lab environment. Workarounds (patching the running container, docker exec overrides) are brittle for CI/dev use.
Happy to test a fix if you have a candidate tag.
Summary
The
yeagerai/simulator-database-migration:latestimage fails to boot whengenlayer up --headless --numValidators 5is run on a fresh install. The migration container exits with code 1 because its alembic configuration appears to hardcodesqlalchemy.urltolocalhostinstead of readingDB_URLfrom the environment. In the docker-compose network,postgresis a service alias — not reachable atlocalhostfrom another container.Repro
Fresh install, macOS on Apple Silicon, Docker Desktop 29.6.1, GenLayer CLI v0.39.2:
Observed
Containers after boot attempt:
genlayer-postgres-1— starts healthy on 5432 ✅genlayer-hardhat-1/genlayer-webdriver-1— healthy ✅genlayer-database-migration-1— starts, then exits with code 1 ❌genlayer-jsonrpc-1— stays inCreatedstate (depends on migration completing) ❌Migration container logs (verbatim tail):
Root cause
The migration container's
DB_URLenv is correctly set to a value pointing at the docker service namepostgres, and postgres is reachable atpostgres:5432from the samegenlayer_defaultnetwork (verified via docker inspect). But alembic attempts to connect tolocalhost:5432inside the migration container's own namespace, where nothing is listening, so it errors withConnection refused.The most likely cause is that
alembic.iniinside the image hardcodessqlalchemy.url = ...@localhost/...andenv.pydoesn't override it withDB_URL.Fix suggestions
Either:
env.pyto override the URL at runtime:config.set_main_option("sqlalchemy.url", os.environ["DB_URL"])before running migrationsalembic.inithat uses the service alias (postgres) as the default hostEnvironment
yeagerai/simulator-database-migration:latest(pulled 2026-07-01)Impact
Blocks fresh
genlayer upon macOS across our lab environment. Workarounds (patching the running container,docker execoverrides) are brittle for CI/dev use.Happy to test a fix if you have a candidate tag.