1 # How to run nominatim-ui together with a Nominatim docker container
3 Nominatim starting version 4.5 uses the [gunicorn](https://gunicorn.org/) webserver
4 returning JSON (or XML) content. Nominatim no longer returns HTML and one cannot add
5 files to the webserver configuration. In other words it's no longer easy to add
6 nominatim-ui into an existing Nominatim docker container.
9 Install Nominatim, for example:
13 -e PBF_URL=https://download.geofabrik.de/europe/monaco-latest.osm.pbf \
15 --name nominatim-monaco \
16 mediagis/nominatim:4.5
19 Nominatim now runs on port 8085 (http://localhost:8085/status)
21 ## Create a nominatim-ui Docker container
23 1. Go to nominatim-ui directory
25 Download the latest nominatim-ui release, then
31 2. Create nominatim-ui configuration
34 tee dist/theme/config.theme.js << EOFUICONF > /dev/null
35 Nominatim_Config.Nominatim_API_Endpoint = 'http://localhost:8085/';
39 3. Create a webserver configuration
42 tee nginx.conf << EOFNGINXCONF > /dev/null
49 root /usr/share/nginx/html;
56 4. Create Docker configuration
59 tee Dockerfile << EOFDOCKERFILE > /dev/null
62 COPY dist /usr/share/nginx/html
64 COPY nginx.conf /etc/nginx/conf.d/default.conf
70 5. Start the Docker container
73 docker build --tag nominatim-ui-service .
74 docker run -it -p 8081:80 nominatim-ui-service
77 nominatim-ui now runs on port 8081 (http://localhost:8081/). Your browser will try
78 to access the Nominatim API on http://localhost:8085/ If that's not reachable you
79 might need to use the server's IP address or hostname.