sqitchers / docker-sqitch

Docker Image packaging for Sqitch
MIT License
36 stars 39 forks source link

Docker sqitch connecting to postgres on mac host fails #27

Closed rangolisharan closed 4 years ago

rangolisharan commented 4 years ago

Steps To Repro: With postres running on Mac (Catalina) host.

docker pull sqitch/sqitch
curl -L https://git.io/fAX6Z -o sqitch && chmod +x sqitch

sqitch deploy --verify -t db:pg://${PG_DB_USER}:${PG_DB_PASSWORD}@${PG_DB_HOST}:${PG_DB_PORT}/${PG_DB_NAME}
Deploying changes to db:pg://postgres:mypassword@docker.for.mac.localhost:5432/test_db
+ sku_uuid .. not ok
"/usr/local/bin/psql" failed to start: "No such file or directory"

Edit: Brew distro of sqitch stopped working for me due to Perl DBD installation issues that I couldn't fix. My sqitch.conf file is from when I was using that. Contents:

[core]
    engine = pg
    # plan_file = sqitch.plan
    # top_dir = .
# [engine "pg"]
    # target = db:pg:
    # registry = sqitch
    # client = /usr/local/bin/psql
rangolisharan commented 4 years ago

Changing sqitch.conf to following works:

[core]
    engine = pg
    # plan_file = sqitch.plan
    # top_dir = .
[engine "pg"]
    # target = db:pg:
    # registry = sqitch
    client = /usr/bin/psql

Can close.