Move config.json to its (hopefully) final location
It didn't make much sense to store config.json inside the "openedx" subfolder anymore, since the configuration values now affect all services.
This commit is contained in:
parent
5cb51e0334
commit
90247bc409
|
@ -1,4 +1,5 @@
|
|||
.*.swp
|
||||
config/config.json
|
||||
config/openedx/*.json
|
||||
config/openedx/*.sh
|
||||
config/mysql/*.env
|
||||
|
|
|
@ -95,11 +95,17 @@ def template_class(user_delimiter='$'):
|
|||
def main():
|
||||
# Hack to handle older config.json files that used to be in a different location
|
||||
# TODO remove me
|
||||
if os.path.exists("config.json"):
|
||||
os.rename("config.json", os.path.join("config", "openedx", "config.json"))
|
||||
config_path = os.path.join("config", "config.json")
|
||||
deprecated_paths = [
|
||||
"config.json",
|
||||
os.path.join("config", "openedx", "config.json"),
|
||||
]
|
||||
for deprecated_path in deprecated_paths:
|
||||
if os.path.exists(deprecated_path):
|
||||
os.rename(deprecated_path, config_path)
|
||||
|
||||
parser = argparse.ArgumentParser("Config file generator for Open edX")
|
||||
parser.add_argument('-c', '--config', default=os.path.join("config", "openedx", "config.json"),
|
||||
parser.add_argument('-c', '--config', default=config_path,
|
||||
help="Load default values from this file. Config values will be saved there.")
|
||||
parser.add_argument('-s', '--silent', action='store_true',
|
||||
help=(
|
||||
|
|
Loading…
Reference in New Issue