mirror of
https://github.com/SnowMB/traefik-certificate-extractor.git
synced 2025-01-18 13:59:33 +08:00
fixes
This commit is contained in:
parent
70f63b7b6f
commit
5c79fe024a
@ -3,7 +3,7 @@ import os
|
||||
import errno
|
||||
import time
|
||||
import json
|
||||
#import docker
|
||||
import docker
|
||||
import argparse
|
||||
from argparse import ArgumentTypeError as err
|
||||
from base64 import b64decode
|
||||
@ -73,14 +73,14 @@ class PathType(object):
|
||||
return string
|
||||
|
||||
|
||||
def restartContainerWithDomain(domains):
|
||||
def restartContainerWithDomains(domains):
|
||||
client = docker.from_env()
|
||||
container = client.containers.list(filters = {"label" : "com.github.SnowMB.traefik-certificate-extractor.restart_domain"})
|
||||
for c in container:
|
||||
restartDomains = str.split(c.labels["com.github.SnowMB.traefik-certificate-extractor.restart_domain"], ',')
|
||||
if not domains.isdisjoint(restartDomains):
|
||||
if not set(domains).isdisjoint(restartDomains):
|
||||
print('restarting container ' + c.id)
|
||||
c.restart()
|
||||
# c.restart()
|
||||
|
||||
|
||||
def createCerts(file, directory, flat):
|
||||
|
@ -1,2 +1,2 @@
|
||||
watchdog
|
||||
watchdog3
|
||||
docker
|
||||
|
Loading…
x
Reference in New Issue
Block a user