diff --git a/config/.env.sample b/config/.env.sample index 6c62e49..89237d1 100644 --- a/config/.env.sample +++ b/config/.env.sample @@ -2,7 +2,7 @@ SSH_PASSWD= # Domain, using Let's Encrypt certificates -DOMAIN_LE= +DOMAIN_DIRECT= # Let's Encrypt account email LE_EMAIL= diff --git a/docs/self_hosting.md b/docs/self_hosting.md index 10e5a80..0f8c38f 100644 --- a/docs/self_hosting.md +++ b/docs/self_hosting.md @@ -49,7 +49,7 @@ git clone https://github.com/hyperknot/openfreemap In the config folder, copy `.env.sample` to `.env` and set the values. -`DOMAIN_LE` - Your subdomain \ +`DOMAIN_DIRECT` - Your subdomain \ `LE_EMAIL` - Your email for Let's Encrypt Set `SKIP_PLANET=true` first. diff --git a/modules/http_host/http_host_lib/nginx.py b/modules/http_host/http_host_lib/nginx.py index da0bd88..29382ef 100644 --- a/modules/http_host/http_host_lib/nginx.py +++ b/modules/http_host/http_host_lib/nginx.py @@ -15,7 +15,7 @@ def write_nginx_config(): curl_text_mix = '' - domain_le = config.ofm_config['domain_le'] + domain_direct = config.ofm_config['domain_direct'] domain_roundrobin = config.ofm_config['domain_roundrobin'] skip_letsencrypt = config.ofm_config['skip_letsencrypt'] @@ -42,7 +42,7 @@ def write_nginx_config(): ) # processing Let's Encrypt config - if domain_le: + if domain_direct: le_cert = config.certs_dir / 'ofm_le.cert' le_key = config.certs_dir / 'ofm_le.key' @@ -53,7 +53,7 @@ def write_nginx_config(): curl_text_mix += create_nginx_conf( template_path=config.nginx_confs / 'le.conf', local='ofm_le', - domain=domain_le, + domain=domain_direct, ) subprocess.run(['nginx', '-t'], check=True) @@ -75,7 +75,7 @@ def write_nginx_config(): '--deploy-hook', 'nginx -t && service nginx reload', '-d', - domain_le, + domain_direct, ], check=True, ) diff --git a/modules/tile_gen/tile_gen_lib/set_version.py b/modules/tile_gen/tile_gen_lib/set_version.py index 6603e16..2f873eb 100644 --- a/modules/tile_gen/tile_gen_lib/set_version.py +++ b/modules/tile_gen/tile_gen_lib/set_version.py @@ -43,7 +43,7 @@ def set_version(area, version): def check_all_hosts(area, version) -> bool: oc = config.ofm_config - domain = oc['domain_roundrobin'] or oc['domain_le'] + domain = oc['domain_roundrobin'] or oc['domain_direct'] print(f'Using domain: {domain}') try: diff --git a/ssh_lib/tasks.py b/ssh_lib/tasks.py index a7a8205..2f3415a 100644 --- a/ssh_lib/tasks.py +++ b/ssh_lib/tasks.py @@ -200,22 +200,22 @@ def setup_roundrobin_writer(c): def upload_config_json(c): - domain_le = dotenv_val('DOMAIN_LE').lower() + domain_direct = dotenv_val('DOMAIN_DIRECT').lower() domain_roundrobin = dotenv_val('DOMAIN_ROUNDROBIN').lower() skip_planet = dotenv_val('SKIP_PLANET').lower() == 'true' skip_letsencrypt = dotenv_val('SKIP_LETSENCRYPT').lower() == 'true' le_email = dotenv_val('LE_EMAIL').lower() - if not (domain_le or domain_roundrobin): - sys.exit('Please specify DOMAIN_LE or DOMAIN_ROUNDROBIN in config/.env') + if not (domain_direct or domain_roundrobin): + sys.exit('Please specify DOMAIN_DIRECT or DOMAIN_ROUNDROBIN in config/.env') - if domain_le and not le_email and not skip_letsencrypt: - sys.exit('Please add your email to LE_EMAIL when using DOMAIN_LE') + if domain_direct and not le_email and not skip_letsencrypt: + sys.exit('Please add your email to LE_EMAIL when using DOMAIN_DIRECT') http_host_list = [h.strip() for h in dotenv_val('HTTP_HOST_LIST').split(',') if h.strip()] config = { - 'domain_le': domain_le, + 'domain_direct': domain_direct, 'domain_roundrobin': domain_roundrobin, 'le_email': le_email, 'skip_planet': skip_planet,