mirror of
https://github.com/nickyeoman/docker-compose-cookbooks.git
synced 2026-09-04 02:46:23 +00:00
removed old VOL Style from portainer script
This commit is contained in:
@@ -265,11 +265,24 @@ def main():
|
|||||||
continue
|
continue
|
||||||
if item.name.endswith(("_dev", "_notes")):
|
if item.name.endswith(("_dev", "_notes")):
|
||||||
continue
|
continue
|
||||||
if not (item / "docker-compose.yml").exists():
|
|
||||||
|
compose_path = item / "docker-compose.yml"
|
||||||
|
if not compose_path.exists():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# ---------------------------------------------
|
||||||
|
# Skip stacks still using ${VOL_PATH
|
||||||
|
# ---------------------------------------------
|
||||||
|
compose_text = compose_path.read_text()
|
||||||
|
if "${VOL_PATH" in compose_text:
|
||||||
|
continue
|
||||||
|
|
||||||
|
# ---------------------------------------------
|
||||||
|
# Generate Portainer template object
|
||||||
|
# ---------------------------------------------
|
||||||
templates.append(generate_template_object(item, nologo=True))
|
templates.append(generate_template_object(item, nologo=True))
|
||||||
|
|
||||||
|
# Write output file
|
||||||
output_data = {
|
output_data = {
|
||||||
"version": "3",
|
"version": "3",
|
||||||
"templates": templates
|
"templates": templates
|
||||||
@@ -278,5 +291,6 @@ def main():
|
|||||||
OUTPUT_FILE.write_text(json.dumps(output_data, indent=2))
|
OUTPUT_FILE.write_text(json.dumps(output_data, indent=2))
|
||||||
print(f"Generated {OUTPUT_FILE} with templates for Docker Compose stacks.")
|
print(f"Generated {OUTPUT_FILE} with templates for Docker Compose stacks.")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|||||||
-1997
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user