Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set-raintale-database.sh calls manage.py migrate with placeholder db config #45

Closed
ato opened this issue Nov 16, 2021 · 2 comments
Closed
Assignees

Comments

@ato
Copy link

ato commented Nov 16, 2021

set-raintale-database.sh creates a file /etc/raintale.conf containing the database details supplied by the command-line and password prompt. It then adds a section to user_settions.py that references these as environment variables. However it never actually sets these as environment variables when calling manage.py migrate, so the placeholder values like "raintale_password" are used instead of the values entered by the user. The migrate command therefore fails with:

psycopg2.OperationalError: FATAL:  password authentication failed for user "raintale"

I worked around this by adding this to set-raintale-database.sh before the migrate command:

source "${raintale_conf}"
export DATABASE_NAME DATABASE_PORT DATABASE_HOST DATABASE_USER DATABASE_PASSWORD
@shawnmjones
Copy link
Member

Thanks for this workaround! I'll incorporate this into the script!

@ato
Copy link
Author

ato commented Dec 3, 2021

I tested the new version and this problem was resolved.

@ato ato closed this as completed Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants