fix #79
@ -3,19 +3,20 @@ import os
|
||||
from minio import Minio
|
||||
|
||||
|
||||
minio_client = Minio(
|
||||
def main():
|
||||
minio_client = Minio(
|
||||
"minio.develop.sprinthub.ru:9000",
|
||||
access_key="serviceminioadmin",
|
||||
secret_key=os.getenv("MINIO_SECRET_KEY", "minioadmin"),
|
||||
secure=False
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
hosts = get('http://configurator/api/v1/fetch?project=certupdater&stage=development').json()['configs']['hosts']
|
||||
hosts = {**hosts, 'platform.develop.sprinthub.ru': {'host': 'platform-nginx', 'port': 1238}}
|
||||
hosts = get('http://configurator/api/v1/fetch?project=certupdater&stage=development').json()['configs']['hosts']
|
||||
hosts = {**hosts, 'platform.develop.sprinthub.ru': {'host': 'platform-nginx', 'port': 1238}}
|
||||
|
||||
config = ''
|
||||
for host, params in hosts.items():
|
||||
config = ''
|
||||
for host, params in hosts.items():
|
||||
config += '''
|
||||
server {{
|
||||
listen 443 ssl http2;
|
||||
@ -48,5 +49,11 @@ for host, params in hosts.items():
|
||||
with open(f"/etc/nginx/{host}/privkey.pem", 'wb') as fp:
|
||||
fp.write(privkey.data)
|
||||
|
||||
with open('/etc/nginx/hosts.conf', 'w') as fp:
|
||||
with open('/etc/nginx/hosts.conf', 'w') as fp:
|
||||
fp.write(config)
|
||||
|
||||
|
||||
try:
|
||||
main()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
Loading…
Reference in New Issue
Block a user