Skip to content

Configuring a PostgreSQL database for yatai-service #1053

Answered by yubozhao
jiyer2016 asked this question in General
Discussion options

You must be logged in to vote

@jiyer2016 I create a PR to lock the sqlalchemy-utils version at #1078

I also tested the yatai service with .pgpass file. This is what I have to make it work.

For my .pgpass file, I created it in the location suggested in the Postgres documentation, ~/.pgpass

  • make sure you escape any values that contain \ or :.
  • change the .pgpass file's permission to 0600

I used a local Postgres docker container with the same user and password values from the .pgpass file

$ docker run --rm -e POSTGRES_PASSWORD=my_password -e POSTGRES_USER=my_user -p 5432:5432 postgres

For my yatai service command, I am now able to pass in the Postgres URL without user/password.

$ bentoml yatai-service-start --db-url pos…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
3 replies
@jackyzha0
Comment options

@jiyer2016
Comment options

@yubozhao
Comment options

Comment options

You must be logged in to vote
3 replies
@jiyer2016
Comment options

@yubozhao
Comment options

@jiyer2016
Comment options

Answer selected by jiyer2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants