mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-09 22:41:03 +01:00
Implemented storage optimizer for mongodb
This commit is contained in:
parent
7745105a23
commit
309aaed37e
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user