]> git.openstreetmap.org Git - nominatim-ui.git/blob - README-nominatim-docker.md
Rebundle latest version
[nominatim-ui.git] / README-nominatim-docker.md
1 # Adding nominatim-ui to a nominatim-docker container
2
3 This document assumes you followed the [nominatim-docker](https://github.com/mediagis/nominatim-docker/) instructions.
4
5 nominatim-ui is a separate project and it's not planned to add the UI to the nominatim-docker installation.
6
7 The following instructions might still be useful and/or help further automate such an installation.
8
9 ```bash
10 # Log into the running container
11 docker exec -it nominatim /bin/bash
12
13 # Download stable nominatim-ui release
14 # available versions: https://github.com/osm-search/nominatim-ui/releases
15 VERSION=3.4.0
16 cd /tmp
17 curl -L --fail -o nominatim-ui.tar.gz https://github.com/osm-search/nominatim-ui/releases/download/v${VERSION}/nominatim-ui-${VERSION}.tar.gz
18 tar -xzf nominatim-ui.tar.gz && rm nominatim-ui.tar.gz
19 mv nominatim-ui-$VERSION nominatim-ui
20
21 # Set the configuration. In this case the UI website should access the API
22 # from the same host and port
23 tee nominatim-ui/dist/theme/config.theme.js << 'EOF'
24 Nominatim_Config.Nominatim_API_Endpoint = '/';
25 EOF
26
27 # Apache configuration has an entry 'DirectoryIndex search.php'. To make
28 # /ui work we just create such a file. Alternatively change the entry for
29 # /ui directory. 
30 # Apache configuration is in /etc/apache2/sites-enabled/000-default.conf
31 cd nominatim-ui/dist/ && ln -s index.html search.php && cd -
32
33 # Move files to Apache webserver directory
34 mkdir /nominatim/website/ui
35 mv nominatim-ui/dist/* /nominatim/website/ui/
36 rm -r nominatim-ui
37 chown -R nominatim:nominatim /nominatim/website/ui/
38 ```
39
40 If the API runs on http://some-host.example.org:8080/ then http://some-host.example.org:8080/ui
41 will now display a website including map and search box.