mirror of
https://github.com/maplibre/martin.git
synced 2024-12-21 05:41:55 +03:00
Blazing fast and lightweight PostGIS, MBtiles and PMtiles tile server, tile generation, and mbtiles tooling.
hacktoberfestleafletmapbox-glmapbox-gl-jsmapbox-vector-tilemaplibremaplibre-gl-jsmapsmbtilespmtilespostgispostgresqlruststarred-maplibre-repostarred-repovector-tileswebserver
.circleci | ||
HomebrewFormula | ||
src | ||
tests | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
Dockerfile | ||
README.md |
Martin
Martin is a PostGIS Mapbox Vector Tiles server written in Rust using Actix web framework.
Installation
You can download Martin from the Github releases page.
If you are running macOS and use Homebrew, you can install Martin using Homebrew tap.
brew tap urbica/tap
brew install martin
Usage
martin postgres://postgres@localhost/db
Environment variables
You can configure martin with environment variables
Environment variable | Example | Description |
---|---|---|
DATABASE_URL | postgres://postgres@localhost/db | postgres database connection |
DATABASE_POOL_SIZE | 20 | maximum connections pool size |
WORKER_PROCESSES | 8 | number of web server workers |
KEEP_ALIVE | 75 | connection keep alive timeout |
Using with Docker
You can use official Docker image urbica/martin
docker run \
-p 3000:3000 \
-e DATABASE_URL=postgres://postgres@localhost/db \
urbica/martin
Building from source
You can clone repository and build Martin using cargo package manager.
git clone git@github.com:urbica/martin.git
cd martin
cargo build --release
The binary will be available at ./target/release/martin
./target/release/martin postgres://postgres@localhost/db
Development
Install project dependencies and check that all the tests run
cargo test
cargo run