From 7064ec740a7566994dff531e7cfa26d063f0e89d Mon Sep 17 00:00:00 2001 From: martabal <74269598+martabal@users.noreply.github.com> Date: Sat, 25 Nov 2023 13:16:50 +0100 Subject: [PATCH] feat: geocoding --- Dockerfile | 18 ++++++++++++++++++ Dockerfile.aarch64 | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/Dockerfile b/Dockerfile index 1b828e6c..cd2004e4 100755 --- a/Dockerfile +++ b/Dockerfile @@ -74,6 +74,7 @@ RUN \ nginx \ nodejs \ perl \ + unzip \ zlib1g && \ echo "**** download immich ****" && \ mkdir -p \ @@ -97,6 +98,22 @@ RUN \ tar xf \ /tmp/immich-dependencies.tar.gz -C \ /tmp/immich-dependencies --strip-components=1 && \ + echo "**** download geocoding data ****" && \ + mkdir -p \ + /usr/src/resources && \ + curl -o \ + /tmp/cities500.zip -L \ + "https://download.geonames.org/export/dump/cities500.zip" && \ + curl -o \ + /usr/src/resources/admin1CodesASCII.txt -L \ + "https://download.geonames.org/export/dump/admin1CodesASCII.txt" && \ + curl -o \ + /usr/src/resources/admin2Codes.txt -L \ + "https://download.geonames.org/export/dump/admin2Codes.txt" && \ + unzip \ + /tmp/cities500.zip -d \ + /usr/src/resources && \ + date --iso-8601=seconds | tr -d "\n" > /usr/src/resources/geodata-date.txt && \ echo "**** build immich dependencies ****" && \ cd /tmp/immich-dependencies/server/bin && \ ./install-ffmpeg.sh && \ @@ -155,6 +172,7 @@ RUN \ meson \ ninja-build \ pkg-config \ + unzip \ wget && \ apt-get autoremove -y --purge && \ apt-get clean && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 80869da7..01c8e47d 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -72,6 +72,7 @@ RUN \ mesa-va-drivers \ nodejs \ perl \ + unzip \ zlib1g && \ echo "**** download immich ****" && \ mkdir -p \ @@ -95,6 +96,22 @@ RUN \ tar xf \ /tmp/immich-dependencies.tar.gz -C \ /tmp/immich-dependencies --strip-components=1 && \ + echo "**** download geocoding data ****" && \ + mkdir -p \ + /usr/src/resources && \ + curl -o \ + /tmp/cities500.zip -L \ + "https://download.geonames.org/export/dump/cities500.zip" && \ + curl -o \ + /usr/src/resources/admin1CodesASCII.txt -L \ + "https://download.geonames.org/export/dump/admin1CodesASCII.txt" && \ + curl -o \ + /usr/src/resources/admin2Codes.txt -L \ + "https://download.geonames.org/export/dump/admin2Codes.txt" && \ + unzip \ + /tmp/cities500.zip -d \ + /usr/src/resources && \ + date --iso-8601=seconds | tr -d "\n" > /usr/src/resources/geodata-date.txt && \ echo "**** build immich dependencies ****" && \ cd /tmp/immich-dependencies/server/bin && \ ./install-ffmpeg.sh && \ @@ -153,6 +170,7 @@ RUN \ meson \ ninja-build \ pkg-config \ + unzip \ wget && \ apt-get autoremove -y --purge && \ apt-get clean && \