init python
This commit is contained in:
1 parent
33fc237cb8
commit
27ca4dfce3
6 files changed
+472
No files matched your search
@@ -0,0 +1,14 @@
|
||||
DOCKERS_ENV = "/kaz/config/dockers.env"
|
||||
SECRETS = "/kaz/secret/env-{serv}"
|
||||
|
||||
def getDockersConfig(key):
|
||||
with open(DOCKERS_ENV) as config:
|
||||
for line in config:
|
||||
if line.startswith(f"{key}="):
|
||||
return line.split("=", 1)[1].split("#")[0].strip()
|
||||
|
||||
def getSecretConfig(serv, key):
|
||||
with open(SECRETS.format(serv=serv)) as config:
|
||||
for line in config:
|
||||
if line.startswith(f"{key}="):
|
||||
return line.split("=", 2)[1].split("#")[0].strip()
|
||||
Reference in new issue
Block a user