Cleanup cruft

This commit is contained in:
dandds
2020-01-27 13:16:56 -05:00
parent 058ee57527
commit adacb6ff19
4 changed files with 17 additions and 27 deletions

View File

@@ -118,24 +118,24 @@ def provision(
create_database_cmd = (
f"docker run -e PGHOST='{dbhost}'"
+f" -e PGPASSWORD='{root_password}'"
+f" -e PGUSER='{root_name}@{dbhost}'"
+f" -e PGDATABASE='{dbname}'"
+f" -e PGSSLMODE=require"
+f" {container}"
+f" .venv/bin/python script/create_database.py {dbname}"
f" -e PGPASSWORD='{root_password}'"
f" -e PGUSER='{root_name}@{dbhost}'"
f" -e PGDATABASE='{dbname}'"
f" -e PGSSLMODE=require"
f" {container}"
f" .venv/bin/python script/create_database.py {dbname}"
)
_run_cmd(create_database_cmd)
seed_database_cmd = (
f"docker run -e PGHOST='{dbhost}'"
+f" -e PGPASSWORD='{root_password}'"
+f" -e PGUSER='{root_name}@{dbhost}'"
+f" -e PGDATABASE='{dbname}'"
+f" -e PGSSLMODE=require"
+f" -v {ccpo_users}:/opt/atat/atst/users.yml"
+f" {container}"
+f" .venv/bin/python script/database_setup.py {user_username} '{user_password}' users.yml"
f" -e PGPASSWORD='{root_password}'"
f" -e PGUSER='{root_name}@{dbhost}'"
f" -e PGDATABASE='{dbname}'"
f" -e PGSSLMODE=require"
f" -v {ccpo_users}:/opt/atat/atst/users.yml"
f" {container}"
f" .venv/bin/python script/database_setup.py {user_username} '{user_password}' users.yml"
)
_run_cmd(seed_database_cmd)