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:
Régis Behmo 2018-06-08 17:39:34 -04:00
parent 5cb51e0334
commit 90247bc409
2 changed files with 10 additions and 3 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
.*.swp
config/config.json
config/openedx/*.json
config/openedx/*.sh
config/mysql/*.env

12
configure vendored
View File

@ -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=(