This commit is contained in:
Zsolt Ero
2023-12-21 12:50:36 +01:00
parent aaf9d2c74e
commit 1bae6bf2e1
7 changed files with 10 additions and 8 deletions

View File

@@ -21,6 +21,7 @@ http {
server_tokens off; server_tokens off;
# TODO add application/vnd.mapbox-vector-tile
include /etc/nginx/mime.types; include /etc/nginx/mime.types;
default_type application/octet-stream; default_type application/octet-stream;

View File

@@ -30,7 +30,6 @@ def prepare_shared(c):
def prepare_tile_gen(c): def prepare_tile_gen(c):
install_planetiler(c) install_planetiler(c)
c.sudo('chown -R ofm:ofm /data/ofm')
for file in [ for file in [
'extract_btrfs.sh', 'extract_btrfs.sh',
@@ -44,7 +43,6 @@ def prepare_tile_gen(c):
scripts / 'tile_gen' / file, scripts / 'tile_gen' / file,
TILE_GEN_BIN, TILE_GEN_BIN,
permissions='755', permissions='755',
owner='ofm',
) )
put( put(
@@ -52,7 +50,6 @@ def prepare_tile_gen(c):
scripts / 'tile_gen' / 'extract_mbtiles' / 'extract_mbtiles.py', scripts / 'tile_gen' / 'extract_mbtiles' / 'extract_mbtiles.py',
f'{TILE_GEN_BIN}/extract_mbtiles/extract_mbtiles.py', f'{TILE_GEN_BIN}/extract_mbtiles/extract_mbtiles.py',
permissions='755', permissions='755',
owner='ofm',
create_parent_dir=True, create_parent_dir=True,
) )
@@ -61,10 +58,12 @@ def prepare_tile_gen(c):
scripts / 'tile_gen' / 'shrink_btrfs' / 'shrink_btrfs.py', scripts / 'tile_gen' / 'shrink_btrfs' / 'shrink_btrfs.py',
f'{TILE_GEN_BIN}/shrink_btrfs/shrink_btrfs.py', f'{TILE_GEN_BIN}/shrink_btrfs/shrink_btrfs.py',
permissions='755', permissions='755',
owner='ofm',
create_parent_dir=True, 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') sudo_cmd(c, f'cd {TILE_GEN_BIN} && source prepare-virtualenv.sh', user='ofm')

View File

@@ -15,7 +15,7 @@ server {
# we need to handle missing tiles as valid request returning empty string # we need to handle missing tiles as valid request returning empty string
location @empty { location @empty {
default_type application/x-protobuf; default_type application/vnd.mapbox-vector-tile;
return 200 ''; return 200 '';
} }
} }

View File

@@ -51,7 +51,7 @@ grep fixed extract_out.log > dedupl_fixed.log || true
rsync -avH \ rsync -avH \
--max-alloc=4294967296 \ --max-alloc=4294967296 \
--exclude dedupl \ --exclude dedupl \
mnt_rw/extract/ mnt_rw2/extract/ \ mnt_rw/extract/ mnt_rw2/ \
> rsync_out.log 2> rsync_err.log > rsync_out.log 2> rsync_err.log

View File

@@ -25,5 +25,6 @@ java -Xmx1g \
> planetiler_out 2> planetiler_err > planetiler_out 2> planetiler_err
rm -r data rm -r data
echo planetiler.jar DONE
#$TILE_GEN_BIN/extract_btrfs.sh $TILE_GEN_BIN/extract_btrfs.sh

View File

@@ -27,5 +27,6 @@ java -Xmx30g \
> planetiler_out 2> planetiler_err > planetiler_out 2> planetiler_err
rm -r data rm -r data
echo planetiler.jar DONE
#$TILE_GEN_BIN/extract_btrfs.sh $TILE_GEN_BIN/extract_btrfs.sh