Setting up an open source stack: PostgreSQL/PostGIS, PG Admin, Martin Tile Server, Nginex with Docker

This tutorial is intended to be part of a series. This first part is on how to setup an open source GIS stack, consisting of a PostgreSQL/PostGIS database, PG Admin to manage it, Martin Tile Server to generate and serve vector tiles from the PostGIS database, and Nginx as the web server. For the web map, I am using MapLibre. I can easily tear down, add or update containers as I need.

The easiest way I found to set up the stack is with Docker containers. I used Docker Desktop for local development work. This is my workflow.

  1. Download and install the appropriate version of Docker Desktop for your computer.
  2. Optional: I am using Visual Studio Code as my text editor. If you don’t have it already, download and install the appropriate version of VS Code for your computer.
  3. Set up your folder structure. This is my example. I have a main folder (gis_docker_demo) with a docker compose file, and a subfolder (web) that has 2 files inside it: index.htlm and nginx.conf
    filestructure
  4. In VS Code. Go to your folder (e.g. gis_docker_demo) and create a new docker-compose.yml file
    • Right click
Built with LogoFlowershow