This commit is contained in:
Zsolt Ero
2025-10-15 16:22:53 +02:00
parent 753166316c
commit 2becae11e1
3 changed files with 7 additions and 7 deletions

View File

@@ -82,7 +82,7 @@ Run the actual deploy command and wait a few minutes
If everything is OK, you'll have some curl lines printed. Run the first one locally and make sure it's showing HTTP/2 200. For example this is an OK response. If everything is OK, you'll have some curl lines printed. Run the first one locally and make sure it's showing HTTP/2 200. For example this is an OK response.
```locally to test them. ```locally to test them.
curl -sI https://test.openfreemap.org/monaco | sort curl -sI https://test.openfreemap.org/monaco
HTTP/2 200 HTTP/2 200
access-control-allow-origin: * access-control-allow-origin: *

View File

@@ -1,7 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import click import click
import json5
from ssh_lib.cli_helpers import common_options, get_connection from ssh_lib.cli_helpers import common_options, get_connection
from ssh_lib.config import config from ssh_lib.config import config
@@ -33,7 +32,8 @@ def init_static(hostname, user, port, noninteractive):
@cli.command() @cli.command()
@common_options @common_options
def init_autoupdate(hostname, user, port, noninteractive): @click.option('--sync', is_flag=True, help='Run manual sync after init')
def init_autoupdate(hostname, user, port, noninteractive, sync):
if not noninteractive and not click.confirm(f'Run script on {hostname}?'): if not noninteractive and not click.confirm(f'Run script on {hostname}?'):
return return
@@ -44,8 +44,8 @@ def init_autoupdate(hostname, user, port, noninteractive):
prepare_shared(c) prepare_shared(c)
prepare_http_host(c) prepare_http_host(c)
# for the monaco run, wait for the sync to complete # if --sync, run manual sync
if json5.loads(config.local_config_jsonc.read_text()).get('skip_planet'): if sync:
run_http_host_sync(c) run_http_host_sync(c)
put(c, config.local_modules_dir / 'http_host' / 'cron.d' / 'ofm_http_host', '/etc/cron.d/') put(c, config.local_modules_dir / 'http_host' / 'cron.d' / 'ofm_http_host', '/etc/cron.d/')

View File

@@ -87,7 +87,7 @@ def dynamic_blocks(domain_data: dict) -> tuple[str, str]:
# f'/{area}/{version}/9999/9999/9999.pbf', # empty_tile test # f'/{area}/{version}/9999/9999/9999.pbf', # empty_tile test
]: ]:
# curl_help_text += f'curl -H "Host: __DOMAIN_SLUG__" -I http://localhost{path}\n' # curl_help_text += f'curl -H "Host: __DOMAIN_SLUG__" -I http://localhost{path}\n'
curl_help_text += f'curl -sI https://__DOMAIN__{path} | sort\n' curl_help_text += f'curl -sI https://__DOMAIN__{path}\n'
nginx_conf_text += create_latest_locations(domain_data=domain_data) nginx_conf_text += create_latest_locations(domain_data=domain_data)
@@ -98,7 +98,7 @@ def dynamic_blocks(domain_data: dict) -> tuple[str, str]:
# f'/{help_area}/latest/9999/9999/9999.pbf', # empty_tile test # f'/{help_area}/latest/9999/9999/9999.pbf', # empty_tile test
]: ]:
# curl_help_text += f'curl -H "Host: __DOMAIN_SLUG__" -I http://localhost{path}\n' # curl_help_text += f'curl -H "Host: __DOMAIN_SLUG__" -I http://localhost{path}\n'
curl_help_text += f'curl -sI https://__DOMAIN__{path} | sort\n' curl_help_text += f'curl -sI https://__DOMAIN__{path}\n'
nginx_conf_text += '\n' + (config.nginx_templates / 'static_blocks.conf').read_text() nginx_conf_text += '\n' + (config.nginx_templates / 'static_blocks.conf').read_text()
return nginx_conf_text, curl_help_text return nginx_conf_text, curl_help_text