Commit d1dad470 authored by Samuel GAIST's avatar Samuel GAIST

[docker] datasets_root_path should not be used anymore as volumes replaces it

parent 719d15ee
......@@ -234,18 +234,17 @@ class DockerExecutor(RemoteExecutor):
database_paths = {}
if 'datasets_root_path' not in self.data:
for db_name in self.databases.keys():
json_path = os.path.join(root_folder, db_name + '.json')
for db_name in self.databases.keys():
json_path = os.path.join(root_folder, db_name + '.json')
with open(json_path, 'r') as f:
db_data = simplejson.load(f)
with open(json_path, 'r') as f:
db_data = simplejson.load(f)
database_paths[db_name] = db_data['root_folder']
db_data['root_folder'] = os.path.join('/databases', db_name)
database_paths[db_name] = db_data['root_folder']
db_data['root_folder'] = os.path.join('/databases', db_name)
with open(json_path, 'w') as f:
simplejson.dump(db_data, f, indent=4)
with open(json_path, 'w') as f:
simplejson.dump(db_data, f, indent=4)
# Determine the docker image to use for the databases
try:
......@@ -276,13 +275,8 @@ class DockerExecutor(RemoteExecutor):
databases_container.add_volume(databases_configuration_path, '/beat/prefix')
databases_container.add_volume(self.cache, '/beat/cache')
if 'datasets_root_path' not in self.data:
for db_name, db_path in database_paths.items():
databases_container.add_volume(db_path, os.path.join('/databases', db_name))
else:
databases_container.add_volume(self.data['datasets_root_path'],
self.data['datasets_root_path'])
for db_name, db_path in database_paths.items():
databases_container.add_volume(db_path, os.path.join('/databases', db_name))
# Start the container
while True:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment