Compare commits
No commits in common. "7e4b38e9da44fe3fdc1da24d3b7de60fc4842296" and "97ac924c221d7e996f884ef3855e9e28b89ca458" have entirely different histories.
7e4b38e9da
...
97ac924c22
@ -3,20 +3,19 @@ import os
|
||||
from minio import Minio
|
||||
|
||||
|
||||
def main():
|
||||
minio_client = Minio(
|
||||
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;
|
||||
@ -49,11 +48,5 @@ def main():
|
||||
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