Skip to content

Commit fc2089f

Browse files
author
Jin IGARASHI
committed
added site_root into environmental variable
1 parent 638aa68 commit fc2089f

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

.env.example

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
REGION=africa
2-
AREA=rwanda
2+
AREA=rwanda
3+
SITE_ROOT=http://localhost:9966

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ rake inet:install # install extra software
1818
# specify OSM regison and area for tiles
1919
export REGION=africa
2020
export AREA=rwanda
21+
export SITE_ROOT=http://localhost:9966 # you can skip if you don't need to change it.
2122
rake inet:download # donwload source geospatial data for exercise
2223
```
2324

@@ -63,6 +64,7 @@ docker run -v $(pwd):/usr/src/app -it unvt/naru
6364
cd /usr/src/app
6465
export REGION=africa
6566
export AREA=rwanda
67+
export SITE_ROOT=http://localhost:9966
6668
rake inet:download # download osm.obf
6769
rake tiles # create mbtiles under src folder
6870
rake style # create style.json

Rakefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
REGION = ENV['REGION']
22
AREA = ENV['AREA']
33
MBTILES = "src/tiles.mbtiles"
4+
SITE_ROOT = ENV['SITE_ROOT'] || 'http://localhost:9966'
45

56
namespace :inet do
67
desc 'install extra software for naru'
@@ -39,7 +40,7 @@ end
3940
desc 'build style.json from HOCON descriptions'
4041
task :style do
4142
require 'json'
42-
sh "parse-hocon hocon/style.conf > docs/style.json"
43+
sh "site_root=#{SITE_ROOT} parse-hocon hocon/style.conf > docs/style.json"
4344
center = JSON.parse(File.read('docs/zxy/metadata.json'))['center'].split(',')
4445
.map{|v| v.to_f }.slice(0, 2)
4546
style = JSON.parse(File.read('docs/style.json'))

hocon/_root.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# _root.conf
22
# project specific parameters
33
#site_root: "https://optgeo.github.io/kokoromi-rw"
4-
site_root: "http://localhost:9966"
4+
# site_root: "http://localhost:9966"
55
# center: [lng, lat]
66
center: [
77
174.786987

0 commit comments

Comments
 (0)