Library sync OsmAnd-style: brick is the server, a client (the car's maptool, SYNC_SERVER_URL) syncs on its Sync button — pulls the server's rows, pushes its own with the source files the server lacks, newer updated_at wins; /api/sync/* guarded by SYNC_TOKEN (written into brick's .env by CI). TRUSTED_NETWORKS logs in the car's LAN (no Gitea offline); TAKEOUT_HOST_DIR for a server without the Takeout; bin/pull-maps.sh pulls map data one way while at home
This commit is contained in:
1 parent
850a5946ad
commit
dbe742321a
13 files changed
+460
-5
No files matched your search
+9
-1
@@ -64,6 +64,13 @@ services:
|
||||
# Google Takeout exports (the "Saved" lists), mounted below; app.rb
|
||||
# imports a new one hourly. Remove both lines to turn it off.
|
||||
TAKEOUT_DIR: /app/takeout
|
||||
# Library sync (lib/maptool/sync.rb): the shared token on the server
|
||||
# and its clients; a client also has the server's URL (Sync button).
|
||||
SYNC_SERVER_URL: ${SYNC_SERVER_URL:-}
|
||||
SYNC_TOKEN: ${SYNC_TOKEN:-}
|
||||
# Only on a server with no reverse proxy in front (the car's): these
|
||||
# networks count as logged in. Never on one behind a proxy.
|
||||
TRUSTED_NETWORKS: ${TRUSTED_NETWORKS:-}
|
||||
volumes:
|
||||
# Uploaded GPX files and the offline PMTiles extract — kept outside
|
||||
# the image so a rebuild/redeploy doesn't wipe them (see
|
||||
@@ -89,7 +96,8 @@ services:
|
||||
# SELinux and the backup tree is unlabeled_t, unreadable for a
|
||||
# container; the root sync job is unaffected by the relabel and new
|
||||
# files inherit the directory's label.
|
||||
- /srv/backup/gdrive/my-drive/current/Takeout:/app/takeout:ro,z
|
||||
# TAKEOUT_HOST_DIR: another server (the car's) points it at an empty dir.
|
||||
- ${TAKEOUT_HOST_DIR:-/srv/backup/gdrive/my-drive/current/Takeout}:/app/takeout:ro,z
|
||||
|
||||
# Serves an offline Wikipedia ZIM for the popup's "Nearby on Wikipedia"
|
||||
# link (see docs/development.adoc for where to get one and drop it in —
|
||||
|
||||
Reference in new issue
Block a user