-
-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust readme and martin book (#1253)
Fixes #1245 Large book and README refactoring, adding quick started section, list of available features to the README, and moving most of the content from README to the book. --------- Co-authored-by: Yuri Astrakhan <[email protected]>
- Loading branch information
1 parent
81f4d4c
commit a9cb0c9
Showing
32 changed files
with
386 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,39 @@ | ||
# Development | ||
|
||
Clone Martin, setting remote name to `upstream`. This way `main` branch will be updated automatically with the latest changes from the upstream repo. | ||
Clone Martin, setting remote name to `upstream`. This way `main` branch will be updated automatically with the latest | ||
changes from the upstream repo. | ||
|
||
```shell, ignore | ||
```bash, ignore | ||
git clone https://github.com/maplibre/martin.git -o upstream | ||
cd martin | ||
``` | ||
|
||
Fork Martin repo into your own GitHub account, and add your fork as a remote | ||
|
||
```shell, ignore | ||
```bash, ignore | ||
git remote add origin _URL_OF_YOUR_FORK_ | ||
``` | ||
|
||
Install [docker](https://docs.docker.com/get-docker/) and [docker-compose](https://docs.docker.com/compose/) | ||
|
||
```shell, ignore | ||
```bash, ignore | ||
# Ubuntu-based distros have an older version that might also work: | ||
sudo apt install -y docker.io docker-compose | ||
``` | ||
|
||
Install a few required libs and tools: | ||
|
||
```shell, ignore | ||
```bash, ignore | ||
# For Ubuntu-based distros | ||
sudo apt install -y build-essential pkg-config jq file | ||
``` | ||
|
||
Install [Just](https://github.com/casey/just#readme) (improved makefile processor). Note that some Linux and Homebrew distros have outdated versions of Just, so you should install it from source: | ||
Install [Just](https://github.com/casey/just#readme) (improved makefile processor). Note that some Linux and Homebrew | ||
distros have outdated versions of Just, so you should install it from source: | ||
|
||
```shell, ignore | ||
```bash, ignore | ||
cargo install just --locked | ||
``` | ||
|
||
When developing MBTiles SQL code, you may need to use `just prepare-sqlite` whenever SQL queries are modified. Run `just` to see all available commands. | ||
When developing MBTiles SQL code, you may need to use `just prepare-sqlite` whenever SQL queries are modified. | ||
Run `just` to see all available commands. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,85 @@ | ||
### Prerequisites | ||
|
||
If using Martin with PostgreSQL database, you must install PostGIS with at least v3.0+, v3.1+ recommended. | ||
If using Martin with PostgreSQL database, you must install PostGIS with at least v3.0+. Postgis v3.1+ is recommended. | ||
|
||
### Binary Distributions | ||
### Docker | ||
|
||
Martin is also available as a [Docker image](https://ghcr.io/maplibre/martin). You could either share a configuration | ||
file from the host with the container via the `-v` param, or you can let Martin auto-discover all sources e.g. by | ||
passing `DATABASE_URL` or specifying the .mbtiles/.pmtiles files or URLs to .pmtiles. | ||
|
||
```bash | ||
export PGPASSWORD=postgres # secret! | ||
|
||
docker run -p 3000:3000 \ | ||
-e PGPASSWORD \ | ||
-e DATABASE_URL=postgresql://user@host:port/db \ | ||
-v /path/to/config/dir:/config \ | ||
ghcr.io/maplibre/martin --config /config/config.yaml | ||
``` | ||
|
||
### From Binary Distributions Manually | ||
|
||
You can download martin from [GitHub releases page](https://github.com/maplibre/martin/releases). | ||
|
||
| Platform | Downloads (latest) | | ||
|----------|------------------------| | ||
| Linux | [64-bit][rl-linux-tar] | | ||
| macOS | [64-bit][rl-macos-tar] | | ||
| Windows | [64-bit][rl-win64-zip] | | ||
| Platform | x64 | ARM-64 | | ||
|----------|--------------------------------------------------------------------------------------------------|-------------------------------------| | ||
| Linux | [.tar.gz][rl-linux-x64] (gnu)<br>[.tar.gz][rl-linux-x64-musl] (musl)<br>[.deb][rl-linux-x64-deb] | [.tar.gz][rl-linux-a64-musl] (musl) | | ||
| macOS | [.tar.gz][rl-macos-x64] | [.tar.gz][rl-macos-a64] | | ||
| Windows | [.zip][rl-win64-zip] | | | ||
|
||
[rl-linux-tar]: https://github.com/maplibre/martin/releases/latest/download/martin-x86_64-unknown-linux-gnu.tar.gz | ||
[rl-macos-tar]: https://github.com/maplibre/martin/releases/latest/download/martin-x86_64-apple-darwin.tar.gz | ||
[rl-win64-zip]: https://github.com/maplibre/martin/releases/latest/download/martin-x86_64-pc-windows-msvc.zip | ||
[rl-linux-x64]: https://github.com/maplibre/martin/releases/latest/download/martin-x86_64-unknown-linux-gnu.tar.gz | ||
|
||
### Building with Cargo | ||
[rl-linux-x64-musl]: https://github.com/maplibre/martin/releases/latest/download/martin-x86_64-unknown-linux-musl.tar.gz | ||
|
||
If you [install Rust](https://www.rust-lang.org/tools/install), you can build martin from source with Cargo: | ||
[rl-linux-x64-deb]: https://github.com/maplibre/martin/releases/latest/download/martin-Debian-x86_64.deb | ||
|
||
```shell | ||
cargo install martin --locked | ||
[rl-linux-a64-musl]: https://github.com/maplibre/martin/releases/latest/download/martin-aarch64-unknown-linux-musl.tar.gz | ||
|
||
[rl-macos-x64]: https://github.com/maplibre/martin/releases/latest/download/martin-x86_64-apple-darwin.tar.gz | ||
|
||
[rl-macos-a64]: https://github.com/maplibre/martin/releases/latest/download/martin-aarch64-apple-darwin.tar.gz | ||
|
||
[rl-win64-zip]: https://github.com/maplibre/martin/releases/latest/download/martin-x86_64-pc-windows-msvc.zip | ||
|
||
Rust users can install pre-built martin binary | ||
with [cargo-binstall](https://github.com/cargo-bins/cargo-binstall) and `cargo`. | ||
|
||
```bash | ||
cargo install cargo-binstall | ||
cargo binstall martin | ||
martin --help | ||
``` | ||
|
||
### Homebrew | ||
### From package | ||
|
||
To install with apt source and others, We need your help | ||
to [improve packaging for various platforms](https://github.com/maplibre/martin/issues/578). | ||
|
||
#### Homebrew | ||
|
||
If you are using macOS and [Homebrew](https://brew.sh/) you can install martin using Homebrew tap. | ||
|
||
```shell | ||
```bash | ||
brew tap maplibre/martin | ||
brew install martin | ||
martin --help | ||
``` | ||
|
||
### Docker | ||
#### Debian Packages(x86_64) manually | ||
|
||
Martin is also available as a [Docker image](https://ghcr.io/maplibre/martin). You could either share a configuration file from the host with the container via the `-v` param, or you can let Martin auto-discover all sources e.g. by passing `DATABASE_URL` or specifying the .mbtiles/.pmtiles files or URLs to .pmtiles. | ||
```bash | ||
curl -O https://github.com/maplibre/martin/releases/latest/download/martin-Debian-x86_64.deb | ||
sudo dpkg -i ./martin-Debian-x86_64.deb | ||
martin --help | ||
rm ./martin-Debian-x86_64.deb | ||
``` | ||
|
||
```shell | ||
export PGPASSWORD=postgres # secret! | ||
docker run -p 3000:3000 \ | ||
-e PGPASSWORD \ | ||
-e DATABASE_URL=postgresql://user@host:port/db \ | ||
-v /path/to/config/dir:/config \ | ||
ghcr.io/maplibre/martin --config /config/config.yaml | ||
### Building From source | ||
|
||
If you [install Rust](https://www.rust-lang.org/tools/install), you can build martin from source with Cargo: | ||
|
||
```bash | ||
cargo install martin --locked | ||
martin --help | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Martin as a library | ||
|
||
Martin can be used as a standalone server, or as a library in your own Rust application. When used as a library, you can use the following features: | ||
|
||
* **postgres** - enable PostgreSQL/PostGIS tile sources | ||
* **pmtiles** - enable PMTile tile sources | ||
* **mbtiles** - enable MBTile tile sources | ||
* **fonts** - enable font sources | ||
* **sprites** - enable sprite sources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.