master #84

Merged
emmatveev merged 9 commits from master into prod 2025-06-12 01:13:28 +03:00
4 changed files with 19 additions and 3 deletions
Showing only changes of commit d1212d852b - Show all commits

View File

@ -6,6 +6,9 @@ services:
image: mathwave/sprint-repo:sprint-infra-nginx-dev
networks:
- common-infra-nginx-development
- configurator
environment:
MINIO_SECRET_KEY: $MINIO_SECRET_KEY_DEV
ports:
- published: 80
target: 80
@ -27,3 +30,5 @@ services:
networks:
common-infra-nginx-development:
external: true
configurator:
external: true

View File

@ -6,6 +6,9 @@ services:
image: mathwave/sprint-repo:sprint-infra-nginx-prod
networks:
- common-infra-nginx
- configurator
environment:
MINIO_SECRET_KEY: $MINIO_SECRET_KEY_PROD
ports:
- published: 80
target: 80
@ -27,3 +30,5 @@ services:
networks:
common-infra-nginx:
external: true
configurator:
external: true

View File

@ -39,7 +39,10 @@ for host, params in hosts.items():
'''.format(host=host, target_host=params['host'], port=params['port'])
fullchain = minio_client.get_object("certupdater", f'certificates/{host}/fullchain.pem')
privkey = minio_client.get_object("certupdater", f'certificates/{host}/privkey.pem')
try:
os.mkdir(f'/etc/nginx/{host}')
except FileExistsError:
...
with open(f"/etc/nginx/{host}/fullchain.pem", 'wb') as fp:
fp.write(fullchain.data)
with open(f"/etc/nginx/{host}/privkey.pem", 'wb') as fp:

View File

@ -39,7 +39,10 @@ for host, params in hosts.items():
'''.format(host=host, target_host=params['host'], port=params['port'])
fullchain = minio_client.get_object("certupdater", f'certificates/{host}/fullchain.pem')
privkey = minio_client.get_object("certupdater", f'certificates/{host}/privkey.pem')
try:
os.mkdir(f'/etc/nginx/{host}')
except FileExistsError:
...
with open(f"/etc/nginx/{host}/fullchain.pem", 'wb') as fp:
fp.write(fullchain.data)
with open(f"/etc/nginx/{host}/privkey.pem", 'wb') as fp: