Skip to content
Snippets Groups Projects
Commit e845f72043d2 authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

docker dev start: add default db user and password to be the same as the project name

parent 0cd2dfe3d159
No related branches found
No related tags found
No related merge requests found
......@@ -49,6 +49,10 @@
program_shortdesc,
str(__date__),
)
# TODO the script assume it is launched from the parent super project
project_path = os.path.realpath('.')
project_name = os.path.basename(project_path)
setup_path = 'setup.cfg'
# Argument parsing
parser = argparse.ArgumentParser(
description=program_license,
......@@ -62,8 +66,8 @@
parser.add_argument(
'--db_user',
help="Database user [default: %(default)s]",
default=None,
default=project_name,
)
parser.add_argument(
'--db_password',
help="Database user password [default: %(default)s]",
......@@ -66,8 +70,8 @@
)
parser.add_argument(
'--db_password',
help="Database user password [default: %(default)s]",
default=None,
default=project_name,
)
# XXX add auto create user and password?
......@@ -86,9 +90,6 @@
db_password = nmspc.db_password
c = ConfigParser.ConfigParser()
# TODO the script assume it is launched from the parent super project
project_path = os.path.realpath('.')
setup_path = 'setup.cfg'
logging.debug('setup file path %s', setup_path)
# TODO test that setup file exists
c.read(setup_path)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment