Skip to content

Commit

Permalink
work
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperknot committed Dec 21, 2023
1 parent aaf9d2c commit 1bae6bf
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions config/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
File renamed without changes.
7 changes: 3 additions & 4 deletions init-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -44,15 +43,13 @@ def prepare_tile_gen(c):
scripts / 'tile_gen' / file,
TILE_GEN_BIN,
permissions='755',
owner='ofm',
)

put(
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,
)

Expand All @@ -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')


Expand Down
2 changes: 1 addition & 1 deletion scripts/http_host/nginx_site.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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 '';
}
}
2 changes: 1 addition & 1 deletion scripts/tile_gen/extract_btrfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
3 changes: 2 additions & 1 deletion scripts/tile_gen/planetiler_monaco.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ java -Xmx1g \
> planetiler_out 2> planetiler_err

rm -r data
echo planetiler.jar DONE

#$TILE_GEN_BIN/extract_btrfs.sh
$TILE_GEN_BIN/extract_btrfs.sh
3 changes: 2 additions & 1 deletion scripts/tile_gen/planetiler_planet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ java -Xmx30g \
> planetiler_out 2> planetiler_err

rm -r data
echo planetiler.jar DONE

#$TILE_GEN_BIN/extract_btrfs.sh
$TILE_GEN_BIN/extract_btrfs.sh

0 comments on commit 1bae6bf

Please sign in to comment.