Blazing fast and lightweight PostGIS, MBtiles and PMtiles tile server, tile generation, and mbtiles tooling.
Go to file
2018-10-10 19:27:21 +03:00
.circleci ci: switch to mdillon/postgis image 2018-10-05 17:50:47 +03:00
HomebrewFormula feat: add homebrew formula 2018-10-10 16:32:33 +03:00
src feat: add command-line interface 2018-10-10 19:13:53 +03:00
tests chore: add debug page 2018-10-09 15:00:25 +03:00
.gitignore chore: add debug page 2018-10-09 15:00:25 +03:00
Cargo.lock feat: add command-line interface 2018-10-10 19:13:53 +03:00
Cargo.toml feat: add command-line interface 2018-10-10 19:13:53 +03:00
Dockerfile chore: update dependencies 2018-08-08 15:12:05 +03:00
README.md doc: update README.md 2018-10-10 19:27:21 +03:00

Martin

CircleCI

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 requires a database connection string. It can be passed as a command-line argument or as a DATABASE_URL environment variable.

martin postgres://postgres@localhost/db

Martin also supports a list of options

Usage:
  martin [options] [<connection>]
  martin -h | --help
  martin -v | --version

Options:
  -h --help               Show this screen.
  -v --version            Show version.
  --workers=<n>           Number of web server workers.
  --pool_size=<n>         Maximum connections pool size [default: 20].
  --keep_alive=<n>        Connection keep alive timeout [default: 75].
  --listen_addresses=<n>  The socket address to bind [default: 0.0.0.0:3000].
  --config=<path>         Path to config file.

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

cd ./target/release/
./martin postgres://postgres@localhost/db

Development

Install project dependencies and check that all the tests run

cargo test
cargo run