mirror of
https://github.com/maplibre/martin.git
synced 2024-12-18 20:31:54 +03:00
1a8e7c89a4
PMTiles is a web-optimized format, allowing the actual file to be read with HTTP range requests. Supporting this use case instantly allows Martin to function as a lambda executable accessing PMTiles, but without any significant investment into devops or hosting large file. PMTiles config now also allows `http` and `https` protocol. ``` # Publish PMTiles files pmtiles: paths: # specific pmtiles file will be published as mypmtiles source # (use last portion of the URL without extension) - http://example.org/path/to/mypmtiles.pmtiles sources: # named source matching source name to a single file pm-src1: https://example.org/path/to/some_pmtiles.pmtiles ``` fixes #884 --------- Co-authored-by: Kyle Slugg-Urbino <35903887+kyleslugg@users.noreply.github.com>
119 lines
3.5 KiB
YAML
119 lines
3.5 KiB
YAML
version: '3'
|
|
|
|
services:
|
|
fileserver:
|
|
image: nginx:alpine
|
|
restart: unless-stopped
|
|
ports:
|
|
- '5412:80'
|
|
volumes:
|
|
- ./tests/fixtures/pmtiles2:/usr/share/nginx/html
|
|
|
|
db-is-ready:
|
|
# This should match the version of postgres used in the CI workflow
|
|
image: postgis/postgis:14-3.3-alpine
|
|
network_mode: host
|
|
command:
|
|
- 'sh'
|
|
- '-c'
|
|
- 'until pg_isready -h localhost -p ${PGPORT:-5411} -U postgres; do sleep 1; done'
|
|
restart: 'no'
|
|
environment:
|
|
- PGDATABASE=db
|
|
- PGUSER=postgres
|
|
- PGPASSWORD=postgres
|
|
- PGHOST=localhost
|
|
- PGPORT=${PGPORT:-5411}
|
|
|
|
db:
|
|
# This should match the version of postgres used in the CI workflow
|
|
image: postgis/postgis:14-3.3-alpine
|
|
restart: unless-stopped
|
|
ports:
|
|
- '${PGPORT:-5411}:5432'
|
|
environment:
|
|
# POSTGRES_* variables are used by the postgis/postgres image
|
|
# PG_* variables are used by psql
|
|
- POSTGRES_DB=db
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=postgres
|
|
- PGDATABASE=db
|
|
- PGUSER=postgres
|
|
- PGPASSWORD=postgres
|
|
volumes:
|
|
- ./tests/fixtures:/fixtures
|
|
- ./tests/fixtures/initdb-dc.sh:/docker-entrypoint-initdb.d/20_martin.sh
|
|
|
|
db-ssl:
|
|
# This should match the version of postgres used in the CI workflow
|
|
image: postgis/postgis:15-3.3
|
|
command:
|
|
- 'postgres'
|
|
- '-c'
|
|
- 'ssl=on'
|
|
- '-c'
|
|
- 'ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem'
|
|
- '-c'
|
|
- 'ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key'
|
|
restart: unless-stopped
|
|
ports:
|
|
- '${PGPORT:-5411}:5432'
|
|
environment:
|
|
# POSTGRES_* variables are used by the postgis/postgres image
|
|
# PG_* variables are used by psql
|
|
- POSTGRES_DB=db
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=postgres
|
|
- PGDATABASE=db
|
|
- PGUSER=postgres
|
|
- PGPASSWORD=postgres
|
|
volumes:
|
|
- ./tests/fixtures:/fixtures
|
|
- ./tests/fixtures/initdb-dc-ssl.sh:/docker-entrypoint-initdb.d/10_martin.sh
|
|
- ./tests/fixtures/initdb-dc.sh:/docker-entrypoint-initdb.d/20_martin.sh
|
|
|
|
db-ssl-cert:
|
|
# This should match the version of postgres used in the CI workflow
|
|
image: postgis/postgis:15-3.3
|
|
command:
|
|
- 'postgres'
|
|
- '-c'
|
|
- 'ssl=on'
|
|
- '-c'
|
|
- 'ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem'
|
|
- '-c'
|
|
- 'ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key'
|
|
restart: unless-stopped
|
|
ports:
|
|
- '${PGPORT:-5411}:5432'
|
|
environment:
|
|
# POSTGRES_* variables are used by the postgis/postgres image
|
|
# PG_* variables are used by psql
|
|
- POSTGRES_DB=db
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=postgres
|
|
- PGDATABASE=db
|
|
- PGUSER=postgres
|
|
- PGPASSWORD=postgres
|
|
volumes:
|
|
- ./tests/fixtures:/fixtures
|
|
- ./tests/fixtures/initdb-dc-ssl-cert.sh:/docker-entrypoint-initdb.d/10_martin.sh
|
|
- ./tests/fixtures/initdb-dc.sh:/docker-entrypoint-initdb.d/20_martin.sh
|
|
|
|
db-legacy:
|
|
# This should match the version of postgres used in the CI workflow
|
|
image: postgis/postgis:11-3.0-alpine
|
|
restart: unless-stopped
|
|
ports:
|
|
- '${PGPORT:-5411}:5432'
|
|
environment:
|
|
- POSTGRES_DB=db
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=postgres
|
|
- PGDATABASE=db
|
|
- PGUSER=postgres
|
|
- PGPASSWORD=postgres
|
|
volumes:
|
|
- ./tests/fixtures:/fixtures
|
|
- ./tests/fixtures/initdb-dc.sh:/docker-entrypoint-initdb.d/20_martin.sh
|