set-raintale-database.sh calls `manage.py migrate` with placeholder db config
Closed this issue · 2 comments
ato commented
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 commented
Thanks for this workaround! I'll incorporate this into the script!
ato commented
I tested the new version and this problem was resolved.