From 4d93db437a15fffe405bf6ee9431bfcc72141013 Mon Sep 17 00:00:00 2001 From: Zsolt Ero Date: Fri, 11 Oct 2024 23:27:29 +0300 Subject: [PATCH] docs(self_hosting.md): clarify instructions for setting up environment variables and provide feedback loop recommendation for SKIP_PLANET refactor(tasks.py): remove unnecessary assertion for cloudflare.ini existence to streamline configuration process --- docs/self_hosting.md | 10 ++++++++-- ssh_lib/tasks.py | 1 - 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/self_hosting.md b/docs/self_hosting.md index 454a998..7a167d9 100644 --- a/docs/self_hosting.md +++ b/docs/self_hosting.md @@ -41,11 +41,13 @@ For example "maps.example.com" -> 185.199.110.153 git clone https://github.com/hyperknot/openfreemap ``` -Copy `.env.sample` to `.env` and set the values. +In the config folder, copy `.env.sample` to `.env` and set the values. `DOMAIN_LE` - Your subdomain \ `LE_EMAIL` - Your email for Let's Encrypt +It's recommended to set `SKIP_PLANET=true` first, check if everything works, and run `./init-server.py` a second time with `SKIP_PLANET=false`. This way you get a quick feedback loop for setting up your system. + #### 3. Set up Python if you don't have it yet On Ubuntu you can get it by `sudo apt install python3-pip` @@ -67,7 +69,11 @@ Then run the actual deploy command ./init-server.py http-host-static HOSTNAME ``` -After this, go for a walk and by the time you come back it should be up and running with the latest planet tiles deployed. Don't worry about the "Download aborted" lines in the meanwhile, it's a bug in CloudFlare. +If you used `SKIP_PLANET=true` then wait a few minutes and see what happens. + +If you use `SKIP_PLANET=false` then go for a walk and by the time you come back it should be up and running with the latest planet tiles deployed. Don't worry about the "Download aborted" lines in the meanwhile, it's a bug in CloudFlare. + +*// Note: If your server doesn't have an SSD, the download + uncompressing process can take hours.* --- diff --git a/ssh_lib/tasks.py b/ssh_lib/tasks.py index b834945..6e9999b 100644 --- a/ssh_lib/tasks.py +++ b/ssh_lib/tasks.py @@ -212,7 +212,6 @@ def upload_config_json(c): sys.exit('Please add your email to LE_EMAIL when using DOMAIN_LE') http_host_list = [h.strip() for h in dotenv_val('HTTP_HOST_LIST').split(',') if h.strip()] - assert (CONFIG_DIR / 'cloudflare.ini').exists() config = { 'domain_le': domain_le,