6 Nextcloud
Markus Bergholz edited this page 5 days ago

Nextcloud - addition services notes

STUN / TURN

stun and turn servers might be necessary in nat networks or behind firewalls.

coturn provides both: https://git.osuv.de/m/dotfiles/src/branch/master/docker/coturn/Dockerfile
registry.gitlab.com/markuman/container-images:coturn

preview generator

/usr/bin/docker exec -u www-data nextcloud ./occ preview:generate-all --path="<user>/files/Fotos/2019/" <user>

settings

/usr/bin/docker exec -u www-data nextcloud ./occ config:app:set previewgenerator squareSizes --value="32 256"
/usr/bin/docker exec -u www-data nextcloud ./occ config:app:set previewgenerator widthSizes  --value="256 384"
/usr/bin/docker exec -u www-data nextcloud ./occ config:app:set previewgenerator heightSizes --value="256"
#/usr/bin/docker exec -u www-data nextcloud ./occ config:system:set preview_max_x --value 500
#/usr/bin/docker exec -u www-data nextcloud ./occ config:system:set preview_max_y --value 500
/usr/bin/docker exec -u www-data nextcloud ./occ config:system:set jpeg_quality --value 60
/usr/bin/docker exec -u www-data nextcloud ./occ config:app:set preview jpeg_quality --value="60"

Via Cronjob for new images when all thumbnails are rendered:

    ./occ preview:pre-generate

TALK BACKEND

OSM Tileserver

Basically use https://github.com/openmaptiles/openmaptiles to generate vector tiles (sqlite3 file, but with .mbtile extension).
For serving the .mbtiles file, use https://github.com/maptiler/tileserver-gl

tileserver-gl can serve .pbf, .png, .jpg and .webp.
For example: https://maps.osuv.de/styles/osm-bright/{z}/{x}/{y}@2x.webp

You can use your own tileserver for gpxpod, gpxedit and gpxmotion.

stats on generating tiles

using AMD Ryzen 5 3600 (6 cores / 12 threads), 64GB RAM DDR4, 2x512GB NVME (Raid 0)

Entire Planet, zoom level 0 to 12

[4d 6h 25m 30.490999999979977s] 100.0000% 17.28m/17.28m @ 161/s | ✓ 17.28m □ 5.09m | 0s left

Entire Planet, zoom level 13

[17d 14h 10m 24.398000000044703s] 100.0000% 50.38m/50.38m @ 7/s | ✓ 50.38m □ 16.73m | 0s left

Europe, zoom level 14

[9d 4h 31m 14.731000000028871s] 100.0000% 31.61m/31.61m @ 36/s | ✓ 31.61m □ 11.96m | 0s left

Merging mbtile files

    ATTACH 'path/to/db2.mbtiles' AS db2;
    INSERT OR REPLACE INTO map SELECT * FROM db2.map;
    INSERT OR REPLACE INTO images SELECT * FROM db2.images;