Skip to content

[Bug]: Alembic migrations fails in docker compose setup #946

@ninadingole

Description

@ninadingole

🐞 Bug Summary

There was a change in the alembic execution to pass the -c flag to the executable. This was done in the Makefile, but wasn't reflected as a part of Docker Compose. While running the Docker Compose setup locally, I ran into the issue and couldn't run the migration. The fix is easy by passing -c /app/mcpgateway/alembic.ini in the Docker Compose file.


🧩 Affected Component

Select the area of the project impacted:

  • mcpgateway - API
  • mcpgateway - UI (admin panel)
  • mcpgateway.wrapper - stdio wrapper
  • Federation or Transports
  • CLI, Makefiles, or shell scripts
  • Container setup (Docker/Podman/Compose)
  • Other (explain below)

🔁 Steps to Reproduce

  1. Uncomment the migration service in the docker-compose.yml file. Also, uncomment the migration dependency in the gateway service.
  2. Run make docker-prod compose-up
  3. The migration job will fail with the error FAILED: No 'script_location' key found in configuration.

🤔 Expected Behavior

The migration should run using alembic


📓 Logs / Error Output

FAILED: No 'script_location' key found in configuration.

🧠 Environment Info

You can retrieve most of this from the /version endpoint.

Key Value
Version or commit v0.6.0
Runtime Gunicorn
Platform / OS macOS
Container Docker

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageIssues / Features awaiting triage

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions