mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-14 06:17:14 +02:00
Implemented storage optimizer for mongodb
This commit is contained in:
@@ -25,8 +25,11 @@ def start_containers(containers):
|
|||||||
run_command(f"docker start {container_list}")
|
run_command(f"docker start {container_list}")
|
||||||
|
|
||||||
def is_database(image):
|
def is_database(image):
|
||||||
databases = {"postgres", "mariadb", "redis", "memcached"}
|
databases = {"postgres", "mariadb", "redis", "memcached", "mongo"}
|
||||||
return any(database in image for database in databases)
|
# Split the string at the colon and take the first part
|
||||||
|
prefix = image.split(':')[0]
|
||||||
|
# Check if the prefix is in the database names
|
||||||
|
return prefix in databases
|
||||||
|
|
||||||
def is_symbolic_link(file_path):
|
def is_symbolic_link(file_path):
|
||||||
return os.path.islink(file_path)
|
return os.path.islink(file_path)
|
||||||
|
Reference in New Issue
Block a user