mirror of
https://gitlab.sectorq.eu/jaydee/portainer.git
synced 2026-01-29 04:49:44 +01:00
build
This commit is contained in:
16
portainer.py
16
portainer.py
@@ -139,10 +139,12 @@ parser.add_argument(
|
||||
)
|
||||
parser.add_argument("--update", "-u", action="store_true", help="Update service if it exists")
|
||||
parser.add_argument("--debug", "-D", action="store_true")
|
||||
parser.add_argument("--launcher", "-L", action="store_true")
|
||||
parser.add_argument("--gpu", "-g", action="store_true")
|
||||
parser.add_argument("--timeout", type=int, default=10, help="Request timeout seconds")
|
||||
parser.add_argument("--deploy-mode", "-m", type=str, default="git", help="Deploy mode")
|
||||
parser.add_argument("--stack-mode", "-w", default=None, help="Stack mode")
|
||||
|
||||
args = parser.parse_args()
|
||||
print("Running version:", VERSION)
|
||||
print("Environment:", args.site)
|
||||
@@ -547,6 +549,8 @@ if __name__ == "__main__":
|
||||
],
|
||||
)
|
||||
por.update_service()
|
||||
if args.launcher:
|
||||
input("Press ENTER to continue...")
|
||||
sys.exit()
|
||||
|
||||
if args.action == "update_containers":
|
||||
@@ -574,6 +578,8 @@ if __name__ == "__main__":
|
||||
],
|
||||
)
|
||||
por.print_stacks(args)
|
||||
if args.launcher:
|
||||
input("Press ENTER to continue...")
|
||||
# print(json.dumps(por.all_data, indent=2))
|
||||
sys.exit()
|
||||
|
||||
@@ -588,6 +594,8 @@ if __name__ == "__main__":
|
||||
],
|
||||
)
|
||||
print("\n".join(por.get_containers()))
|
||||
if args.launcher:
|
||||
input("Press ENTER to continue...")
|
||||
sys.exit()
|
||||
|
||||
if args.action == "update_stack":
|
||||
@@ -601,11 +609,16 @@ if __name__ == "__main__":
|
||||
)
|
||||
|
||||
por.update_stack(args)
|
||||
if args.launcher:
|
||||
input("Press ENTER to continue...")
|
||||
sys.exit()
|
||||
|
||||
if args.action == "print_all_data":
|
||||
print(json.dumps(por.all_data, indent=2))
|
||||
if args.launcher:
|
||||
input("Press ENTER to continue...")
|
||||
sys.exit()
|
||||
|
||||
if args.action == "update_status":
|
||||
por.update_status(args.endpoint_id, args.stack)
|
||||
sys.exit()
|
||||
@@ -617,7 +630,8 @@ if __name__ == "__main__":
|
||||
export_data.append([i, eps["by_id"][i]])
|
||||
headers = ["EndpointId", "Name"]
|
||||
print(tabulate(export_data, headers=headers, tablefmt="github"))
|
||||
|
||||
if args.launcher:
|
||||
input("Press ENTER to continue...")
|
||||
sys.exit()
|
||||
|
||||
if args.action == "stop_containers":
|
||||
|
||||
Reference in New Issue
Block a user