diff --git a/config/nginx/nginx.conf b/config/nginx/nginx.conf index 554531f..08fdc4a 100644 --- a/config/nginx/nginx.conf +++ b/config/nginx/nginx.conf @@ -21,6 +21,7 @@ http { server_tokens off; + # TODO add application/vnd.mapbox-vector-tile include /etc/nginx/mime.types; default_type application/octet-stream; diff --git a/scripts/tile_gen/_not_used/extract_ext4.sh b/docs/_not_used/extract_ext4.sh similarity index 100% rename from scripts/tile_gen/_not_used/extract_ext4.sh rename to docs/_not_used/extract_ext4.sh diff --git a/init-server.py b/init-server.py index f7f3168..5600ba0 100755 --- a/init-server.py +++ b/init-server.py @@ -30,7 +30,6 @@ def prepare_shared(c): def prepare_tile_gen(c): install_planetiler(c) - c.sudo('chown -R ofm:ofm /data/ofm') for file in [ 'extract_btrfs.sh', @@ -44,7 +43,6 @@ def prepare_tile_gen(c): scripts / 'tile_gen' / file, TILE_GEN_BIN, permissions='755', - owner='ofm', ) put( @@ -52,7 +50,6 @@ def prepare_tile_gen(c): scripts / 'tile_gen' / 'extract_mbtiles' / 'extract_mbtiles.py', f'{TILE_GEN_BIN}/extract_mbtiles/extract_mbtiles.py', permissions='755', - owner='ofm', create_parent_dir=True, ) @@ -61,10 +58,12 @@ def prepare_tile_gen(c): scripts / 'tile_gen' / 'shrink_btrfs' / 'shrink_btrfs.py', f'{TILE_GEN_BIN}/shrink_btrfs/shrink_btrfs.py', permissions='755', - owner='ofm', create_parent_dir=True, ) + c.sudo('chown ofm:ofm /data/ofm') + c.sudo('chown -R ofm:ofm /data/ofm/bin') + sudo_cmd(c, f'cd {TILE_GEN_BIN} && source prepare-virtualenv.sh', user='ofm') diff --git a/scripts/http_host/nginx_site.conf b/scripts/http_host/nginx_site.conf index 1f8d4b9..ef28bc9 100644 --- a/scripts/http_host/nginx_site.conf +++ b/scripts/http_host/nginx_site.conf @@ -15,7 +15,7 @@ server { # we need to handle missing tiles as valid request returning empty string location @empty { - default_type application/x-protobuf; + default_type application/vnd.mapbox-vector-tile; return 200 ''; } } diff --git a/scripts/tile_gen/extract_btrfs.sh b/scripts/tile_gen/extract_btrfs.sh index 9ef01dd..5ef6671 100644 --- a/scripts/tile_gen/extract_btrfs.sh +++ b/scripts/tile_gen/extract_btrfs.sh @@ -51,7 +51,7 @@ grep fixed extract_out.log > dedupl_fixed.log || true rsync -avH \ --max-alloc=4294967296 \ --exclude dedupl \ - mnt_rw/extract/ mnt_rw2/extract/ \ + mnt_rw/extract/ mnt_rw2/ \ > rsync_out.log 2> rsync_err.log diff --git a/scripts/tile_gen/planetiler_monaco.sh b/scripts/tile_gen/planetiler_monaco.sh index 06d4347..907804c 100644 --- a/scripts/tile_gen/planetiler_monaco.sh +++ b/scripts/tile_gen/planetiler_monaco.sh @@ -25,5 +25,6 @@ java -Xmx1g \ > planetiler_out 2> planetiler_err rm -r data +echo planetiler.jar DONE -#$TILE_GEN_BIN/extract_btrfs.sh \ No newline at end of file +$TILE_GEN_BIN/extract_btrfs.sh \ No newline at end of file diff --git a/scripts/tile_gen/planetiler_planet.sh b/scripts/tile_gen/planetiler_planet.sh index 773242d..b154969 100644 --- a/scripts/tile_gen/planetiler_planet.sh +++ b/scripts/tile_gen/planetiler_planet.sh @@ -27,5 +27,6 @@ java -Xmx30g \ > planetiler_out 2> planetiler_err rm -r data +echo planetiler.jar DONE -#$TILE_GEN_BIN/extract_btrfs.sh \ No newline at end of file +$TILE_GEN_BIN/extract_btrfs.sh \ No newline at end of file