This commit is contained in:
Zsolt Ero
2025-10-08 01:32:54 +02:00
parent 154d592ace
commit 45df827cb0
3 changed files with 8 additions and 9 deletions

1
.gitignore vendored
View File

@@ -21,3 +21,4 @@ venv
/pnpm-lock.yaml
/deploy-*.sh
tmp.txt

View File

@@ -76,12 +76,12 @@ def http_host_autoupdate(hostname, user, port, noninteractive):
c.sudo('rm -f /etc/cron.d/ofm_http_host')
prepare_shared(c)
# prepare_shared(c)
prepare_http_host(c)
run_http_host_sync(c) # disable for first install if you don't want to wait
put(c, config.local_modules_dir / 'http_host' / 'cron.d' / 'ofm_http_host', '/etc/cron.d/')
#
# run_http_host_sync(c) # disable for first install if you don't want to wait
#
# put(c, config.local_modules_dir / 'http_host' / 'cron.d' / 'ofm_http_host', '/etc/cron.d/')
@cli.command()

View File

@@ -16,8 +16,6 @@ def prepare_http_host(c):
kernel_somaxconn65k(c)
kernel_limits1m(c)
upload_config_and_certs(c)
nginx(c)
certbot(c)
@@ -30,9 +28,10 @@ def prepare_http_host(c):
c.sudo(f'chown nginx:nginx {config.http_host_dir}/logs_nginx')
upload_http_host_files(c)
c.sudo(f'{config.venv_bin}/pip install -e {config.http_host_bin} --use-pep517')
upload_config_and_certs(c)
def upload_config_and_certs(c):
if not config.local_config_jsonc.is_file():
@@ -83,7 +82,6 @@ def upload_config_and_certs(c):
remote_cert_path = f'/data/nginx/certs/ofm-{domain_data["slug"]}.cert'
remote_key_path = f'/data/nginx/certs/ofm-{domain_data["slug"]}.key'
# TODO fix permissions
put(c, local_cert_path, remote_cert_path)
put(c, local_key_path, remote_key_path)