]> git.openstreetmap.org Git - nominatim-ui.git/commitdiff
add instructions for nominatim-docker container installation
authorMarc Tobias <mtmail@gmx.net>
Tue, 17 Oct 2023 16:39:54 +0000 (18:39 +0200)
committermtmail <mtmail@gmx.net>
Tue, 17 Oct 2023 16:41:22 +0000 (18:41 +0200)
README-nominatim-docker.md [new file with mode: 0644]
README.md

diff --git a/README-nominatim-docker.md b/README-nominatim-docker.md
new file mode 100644 (file)
index 0000000..b6fc9c2
--- /dev/null
@@ -0,0 +1,41 @@
+# Adding nominatim-ui to a nominatim-docker container
+
+This document assumes you followed the [nominatim-docker](https://github.com/mediagis/nominatim-docker/) instructions.
+
+nominatim-ui is a separate project and it's not planned to add the UI to the nominatim-docker installation.
+
+The following instructions might still be useful and/or help futher automate such an installation.
+
+```
+# Log into the running container
+docker exec -it nominatim /bin/bash
+
+# Download stable nominatim-ui release
+# available verions: https://github.com/osm-search/nominatim-ui/releases
+VERSION=3.4.0
+cd /tmp
+curl -L --fail -o nominatim-ui.tar.gz https://github.com/osm-search/nominatim-ui/releases/download/v${VERSION}/nominatim-ui-${VERSION}.tar.gz
+tar -xzf nominatim-ui.tar.gz && rm nominatim-ui.tar.gz
+mv nominatim-ui-$VERSION nominatim-ui
+
+# Set the configuration. In this case the UI website should access the API
+# from the same host and port
+tee nominatim-ui/dist/theme/config.theme.js << 'EOF'
+Nominatim_Config.Nominatim_API_Endpoint = '/';
+EOF
+
+# Apache configuration has an entry 'DirectoryIndex search.php'. To make
+# /ui work we just create such a file. Alternatively change the entry for
+# /ui directory. 
+# Apache configuration is in /etc/apache2/sites-enabled/000-default.conf
+cd nominatim-ui/dist/ && ln -s index.html search.php && cd -
+
+# Move files to Apache webserver directory
+mkdir /nominatim/website/ui
+mv nominatim-ui/dist/* /nominatim/website/ui/
+rm -r nominatim-ui
+chown -R nominatim:nominatim /nominatim/website/ui/
+```
+
+If the API runs on http://some-host.example.org:8080/ then http://some-host.example.org:8080/ui
+will now display a website including map and search box.
\ No newline at end of file
index fa4f021d385c43a79bf4989ffb875d54fb8f633c..725543875fb21398c76f2808fe10cdcc7d34427a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -27,6 +27,7 @@ You can either
 
 * start a webserver using ([Big list of http static server one-liners](https://gist.github.com/willurd/5720255)) or configure Apache, nginx or other webservers to serve the `dist` directory.
 
+* to add the files into a nominatim-docker container see [README-nominatim-docker.md]() file
 
 ## Configuration