blinklabs-io / docker-cardano-db-sync

Docker container image for cardano-db-sync with additional tools for management.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generating PGPASS file error

rubenhbaca opened this issue · comments

I am trying to use your docker image. I am getting this error.

/bin/gen-pgpass: line 6: /run/secrets/postgres_db: No such file or directory
/bin/gen-pgpass: line 7: /run/secrets/postgres_user: No such file or directory
/bin/gen-pgpass: line 8: /run/secrets/postgres_password: No such file or directory

I think I need to attach a volume to /run/secrets/ and in that volume, I need to have the files postgres_db, postgres_user, and postgres_password.

I am running docker with this command.

docker run -v /media/external/dbsync:/var/lib/cexplorer -v /host/cardano-node-pipe:/node-ipc cloudstruct/cardano-db-sync:13.0.5

I didn't give it a name and I didn't detach it because I wanted to make sure I can run it in my shell before relying on it.

Can you please confirm?

I will take a look today, but the instructions are a bit misleading.

There's no PostgreSQL database within the container, so you need to provide some method for authentication to the external database. I'll expand the documentation and improve the error handling.

You can use the container by either mounting a pgpass file at /configuration/pgpass or by passing the POSTGRES_DB, POSTGRES_USER, POSTGRES_PASSWORD, and the POSTGRES_HOST and POSTGRES_PORT variables to point to your PostgreSQL instance.

Thank you for your reply. Yes, let me give that a go tonight. Now it all makes perfect sense. I must have been too sleepy last night.