Browse Source

Add nginx-based preview

pull/6/head
Julian Simioni 7 years ago
parent
commit
eb10778669
No known key found for this signature in database
GPG Key ID: B9EEB0C6EE0910A1
  1. 43
      common/preview/index.html
  2. 7
      projects/south-africa/docker-compose.yml

43
common/preview/index.html

@ -0,0 +1,43 @@
<html>
<head>
<title>pelias autocomplete demo</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css"
integrity="sha512-Rksm5RenBEKSKFjgI3a41vrjkw4EVPlJ3+OiI65vTjIdo9brlAacEuKOiQ5OFh7cOI1bkDwLqdLw3Zg0cRJAAQ=="
crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.3.1/dist/leaflet.js"
integrity="sha512-/Nsx9X4HebavoBvEBuyp3I7od5tA0UzAxs+j83KgC8PU0kgB4XiK4Lfe4y4cgBtaRJQEIFCW+oC506aPT2L1zw=="
crossorigin=""></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet-geocoder-mapzen/1.9.4/leaflet-geocoder-mapzen.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-geocoder-mapzen/1.9.4/leaflet-geocoder-mapzen.js"></script>
<style>
#map{ height: 800px; }
</style>
</head>
<body>
<div id="map"></div>
<script>
var map = L.map('map', {
center:[42.35, -71.08],
zoom: 3,
minZoom:2,
scrollWheelZoom: false
});
var geocodingOptions = {
url: 'http://localhost:4000/v1',
expanded: true,
attribution: '<a href="https://openstreetmap.org/copyright">OpenStreetMap</a> and <a href=" https://geocode.earth/guidelines">others</a>'
};
L.control.geocoder(null, geocodingOptions).addTo(map);
L.tileLayer('http://tile.stamen.com/toner/{z}/{x}/{y}.png', {
attribution: 'Tiles by <a href="http://stamen.com">Stamen Design</a>',
maxZoom: 17,
minZoom: 1
}).addTo(map);
</script>
</body>
</html>

7
projects/south-africa/docker-compose.yml

@ -98,6 +98,13 @@ services:
volumes:
- "./pelias.json:/code/pelias.json"
- "${DATA_DIR}:/data"
preview:
image: nginx
container_name: pelias_preview
restart: always
ports: [ "3000:80" ]
volumes:
- "../../common/preview:/usr/share/nginx/html"
elasticsearch:
image: pelias/elasticsearch
container_name: pelias_elasticsearch

Loading…
Cancel
Save