help fine tuning my docker open street maps overpass api on a rpi5

  • Really appreciate any help with this from the very smart people in this community :)


    Project objective - is to have a opensource system to track my teenage son's driving behaviour. Particularly to see if he is speeding or in a car with friends who are driving dangerously. Life360 is the easy way but it is not open source and they have terrible data privacy policies. So...


    I have successfully built an overpass-api docker image and after much pain have it running on a rpi5 with 8GB ram! I think some of the issues (not all) I have encountered are related to RAM memory.


    I have successfully integrated the overpass-api to work with my traccar container also running on the same rpi. Today I was speeding (a little) and it is working.


    link to overpass-api docker that I have built for arm64. https://github.com/wiktorn/Overpass-API/tree/master





    I have 3 little tweaks/improvements that I need a bit of help with.


    1. More RAM memory via a swap file moved from the SD card to the ext4 system disk (new and fast SSD)

    2. I have had to download the entire planet of openstreetmap data - there is a way to do this differently but I can't quite work it out

    3. similar to 2 - there is a way to healthcheck the operpass container but I have something slightly wrong with my syntax


    So can anyone help with the swap file question and see anything wrong with the following 2 code snippets (both from a compose file in docker)?


    This one is supposed to decompress the pbf file to bz2 format so I can just pull Oz data. At the moment I am cloning the entire planet 360GB just to run api calls to return speed limit. haha

    Code
          - OVERPASS_PLANET_URL=https://download.geofabrik.de/australia-oceania/australia-latest.osm.pbf
          - OVERPASS_DIFF_URL=https://planet.openstreetmap.org/replication/minute/
          - OVERPASS_COMPRESSION=gz
          - OVERPASS_PLANET_PREPROCESS='mv /db/planet.osm.bz2 /db/australia-latest.osm.pbf && osmium cat -o /db/planet.osm.bz2 /db/australia-latest.osm.pbf && rm /db/australia-latest.osm.pbf'


    And this is one is supposed to check that the container is healthy but something is wrong running on arm64 (I think it only works on amd64). I get an invalid escape character error - see below.


    Code
    test: ["CMD-SHELL", "curl --noproxy '*' -qf 'http://192.168.100.105:8084/api/interpreter?data=\[out:json\];node(1);out;' | jq '.generator' |grep -q Overpass || exit 1"]


Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!