managarten/services/mana-geocoding/pelias/docker-compose.yml
Till JS 6977d189ab fix(geocoding): don't bind libpostal to host port 4400
Port 4400 collides with mana-infra-landings (status.mana.how nginx)
on the production mac mini. libpostal is only reached internally by
pelias-api over the pelias compose network anyway — no host binding
needed. Use expose instead of ports to drop the host mapping.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 16:41:26 +02:00

121 lines
3.3 KiB
YAML

# Pelias geocoding stack for mana-geocoding.
#
# Data pipeline: download → prepare → import → serve.
# See pelias/README.md for initial setup instructions.
#
# After import, only `api` and `libpostal` need to stay running.
# The import containers (placeholder, interpolation, pip, elasticsearch)
# run during import and can be stopped afterward if RAM is tight,
# but elasticsearch must stay up for queries.
services:
# --- Always running ---
api:
image: pelias/api:latest
container_name: pelias-api
restart: unless-stopped
ports:
- "4000:4000"
environment:
PORT: 4000
volumes:
- ./pelias.json:/code/pelias.json:ro
# Patch: always return the `category` field in API responses, not only
# when a `categories=...` filter is present. Pelias' default
# `checkCategoryParam` hides category from results unless the caller
# filters by it, but we want the OSM taxonomy (food, retail, transport, …)
# on every venue so our Places UI can auto-map it to a PlaceCategory.
# The patched file is generated from the upstream one with
# `sed "s|condition: checkCategoryParam|condition: () => true|"`
- ./geojsonify_place_details.js:/code/pelias/api/helper/geojsonify_place_details.js:ro
depends_on:
elasticsearch:
condition: service_healthy
networks:
- pelias
libpostal:
image: pelias/libpostal-service
container_name: pelias-libpostal
restart: unless-stopped
# No host port mapping — libpostal is an internal dependency of
# pelias-api, reached over the pelias network at libpostal:4400.
# Port 4400 on the host is used by mana-infra-landings (nginx for
# status.mana.how) on the production mac mini.
expose:
- "4400"
networks:
- pelias
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.1
container_name: pelias-elasticsearch
restart: unless-stopped
ports:
- "9200:9200"
volumes:
- pelias-elasticsearch:/usr/share/elasticsearch/data
environment:
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
discovery.type: single-node
xpack.security.enabled: "false"
ulimits:
memlock:
soft: -1
hard: -1
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200/_cluster/health"]
interval: 10s
timeout: 5s
retries: 30
networks:
- pelias
# --- Import pipeline (run once, then stop) ---
schema:
image: pelias/schema:latest
container_name: pelias-schema
volumes:
- ./pelias.json:/code/pelias.json:ro
depends_on:
elasticsearch:
condition: service_healthy
networks:
- pelias
profiles: ["import"]
openstreetmap:
image: pelias/openstreetmap:latest
container_name: pelias-openstreetmap
volumes:
- ./pelias.json:/code/pelias.json:ro
- pelias-data:/data
depends_on:
elasticsearch:
condition: service_healthy
networks:
- pelias
profiles: ["import"]
polylines:
image: pelias/polylines:latest
container_name: pelias-polylines
volumes:
- ./pelias.json:/code/pelias.json:ro
- pelias-data:/data
depends_on:
elasticsearch:
condition: service_healthy
networks:
- pelias
profiles: ["import"]
volumes:
pelias-elasticsearch:
pelias-data:
networks:
pelias:
driver: bridge