Skip to content

Invoke dbmate from Docker and trigger migration in postgres  #128

@jayarjo

Description

@jayarjo

I was trying the following:

$ docker run --rm -it --env DATABASE_URL="..." --mount type=bind,source=...,target=/app amacneil/dbmate --no-dump-schema --migrations-dir /app up

However I repeatedly get:

Error: dial tcp 127.0.0.1:57806: connect: connection refused

DATABASE_URL points to the postgres server running on another Docker container (not sure how that should matter?)

Do I need to to anything in addition to the above command to be able to run migrations on another Docker container that is running postgres?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions