1
0
foss4g-workshop/docker-compose.yml
dracic a5d9e32d9b OSM vector tile server setup with postgis and tegola
- Set up docker-compose with PostgreSQL/PostGIS and Tegola services
- Added initialization scripts for database setup and OSM data import
- Configured Tegola with vector tile layers for roads and buildings
- Included README with setup instructions and troubleshooting guide
2025-07-14 18:33:45 +02:00

56 lines
1.3 KiB
YAML

services:
# PostgreSQL with PostGIS Service
postgres:
image: kartoza/postgis:15-3.3
container_name: workshop-postgres
restart: unless-stopped
environment:
POSTGRES_DB: osm
POSTGRES_USER: postgres
POSTGRES_PASS: postgres
PGDATA: /var/lib/postgresql/data/pgdata
DEFAULT_ENCODING: "UTF8"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init-scripts:/docker-entrypoint-initdb.d
- ./osm-data:/osm-data
networks:
- workshop_net
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d osm"]
interval: 30s
timeout: 5s
retries: 3
start_period: 40s
# Tegola Vector Tile Server Service
tegola:
image: gospatial/tegola:latest
container_name: workshop-tegola
restart: unless-stopped
command: ["serve", "--config", "/etc/tegola/config.toml"]
volumes:
- ./tegola_config.toml:/etc/tegola/config.toml
networks:
- workshop_net
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8080/capabilities"]
interval: 15s
timeout: 5s
retries: 3
start_period: 20s
volumes:
postgres_data:
driver: local
networks:
workshop_net:
driver: bridge