diff --git a/main.py b/main.py index ce3f69d..a008b29 100755 --- a/main.py +++ b/main.py @@ -149,7 +149,7 @@ 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") - +parser.add_argument("--excluded", "-e", default=["portainer", "nginx"], help="Exclude from update") args = parser.parse_args() print("Running version:", VERSION) print("Environment:", args.site) diff --git a/portainer/api.py b/portainer/api.py index 2b19b1b..0dba81f 100644 --- a/portainer/api.py +++ b/portainer/api.py @@ -1036,6 +1036,8 @@ class PortainerApi: if resp['Status'] == "outdated": if pull: + if service_dict[service_id] in args.excluded: + continue self.restart_srv(service_id, pull) #print(f"Service {service_dict[service_id]:<{longest}} : updated") self.gotify_message(f"Service {service_dict[service_id]} updated")