From 05a2dded9ad89b6cd8ca6fd709f63c19aff31d3a Mon Sep 17 00:00:00 2001 From: Zsolt Ero Date: Fri, 23 Feb 2024 03:12:52 +0100 Subject: [PATCH] readme --- README.md | 8 ++++++-- docs/dev_setup.md | 33 +++++++++++++++++++++++++++++++++ docs/self_hosting.md | 10 +++++++--- 3 files changed, 46 insertions(+), 5 deletions(-) create mode 100644 docs/dev_setup.md diff --git a/README.md b/README.md index 90dae48..be6e9ea 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ The only way this project can possibly work is to be super focused about what it This repo is also Docker free. If someone wants to make a Docker-based version of this, I'm more than happy to link it here. -3. OFM does not promise worry-free automatic updates for self-hosters. Only use the autoupdate command if you keep a close eye on this repo. +3. OFM does not promise worry-free automatic updates for self-hosters. Only use the autoupdate version of http-host if you keep a close eye on this repo. ## Code structure @@ -49,7 +49,7 @@ The project has the following parts #### deploy server - ssh_lib and init-server.py -This sets up everything on a clean Ubuntu server. You run it locally and it sets up the server via SSH. You specify `--tile-gen` and/or `--http-host` at startup. +This sets up everything on a clean Ubuntu server. You run it locally and it sets up the server via SSH. #### HTTP host - scripts/http_host @@ -164,6 +164,10 @@ Tasks outside the scope of this project: - Make a successor for the OpenMapTiles schema. - Docker image for running this self-hosted on any machine. +### Dev setup + +See [dev setup docs](docs/dev_setup.md). + ## Changelog diff --git a/docs/dev_setup.md b/docs/dev_setup.md new file mode 100644 index 0000000..3fc23e7 --- /dev/null +++ b/docs/dev_setup.md @@ -0,0 +1,33 @@ +# dev setup + + + +### macOS + +On macOS, I recommend [OrbStack](https://orbstack.dev/). + +I saved this function into my bash_profile. It sets up a clean x64-based Ubuntu 22 VM in a few seconds. + +``` +orb_reset() { + orbctl delete -f ubuntu-test + orbctl create -a amd64 ubuntu:jammy ubuntu-test +} +``` + +I saved the following in `.ssh/config`: + +``` +Host orb_my + Hostname 127.0.0.1 + Port 32222 + IdentityFile ~/.orbstack/ssh/id_ed25519 +``` + +Then I run commands like the following: + +``` +./init-server.py http-host-once orb_my +./init-server.py debug orb_my +``` + diff --git a/docs/self_hosting.md b/docs/self_hosting.md index b85c537..5a6bfc0 100644 --- a/docs/self_hosting.md +++ b/docs/self_hosting.md @@ -12,6 +12,8 @@ When self-hosting, there are two tasks you can set up on a server (see details i note: Tile generation is 100% optional, as we are providing the processed full planet files for public download. It also requires a beefy machine, see below. + + ### System requirements ##### Disk space @@ -34,7 +36,7 @@ note: Tile generation is 100% optional, as we are providing the processed full p ### Limitations -There is two limitation in the current beta version: +There are two limitations in the current beta version: - You have to set up Let's Encrypt manually or supply your certs. @@ -67,9 +69,11 @@ It's recommended to use [direnv](https://direnv.net/), to have automatic venv ac #### 2. Certs and domains -Currently the domain is hard coded to `tiles.openfreemap.org`. Please search & replace for this string to your custom one. +Currently the domain is hard coded to `tiles.openfreemap.org`. Please search & replace this. -The script is made with long expiry CloudFlare origin certificates in mind, which are placed in the `config/certs` folder. For self-hosting you may want to use Let's Encrypt or similar automated tool. The support for this is coming later. +The script is made with long expiry CloudFlare origin certificates in mind, which are placed in the `config/certs` folder. For self-hosting you may want to use Let's Encrypt or similar automated tool. + +If you know how to make Let's Encrypt work with Round Robin DNS, please comment in the Discussions. #### 3. Deploy a http-host