Update to 2023 versions
This commit is contained in:
		@@ -8,7 +8,7 @@ RUN apt-get update \
 | 
				
			|||||||
    && rm -rf /var/lib/apt/lists/*
 | 
					    && rm -rf /var/lib/apt/lists/*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
WORKDIR /photon
 | 
					WORKDIR /photon
 | 
				
			||||||
ADD http://photon.komoot.de/data/photon-0.2.7.jar /photon/photon.jar
 | 
					ADD https://github.com/komoot/photon/releases/download/0.4.2/photon-0.4.2.jar /photon/photon.jar
 | 
				
			||||||
COPY entrypoint.sh ./entrypoint.sh
 | 
					COPY entrypoint.sh ./entrypoint.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
VOLUME /photon/photon_data
 | 
					VOLUME /photon/photon_data
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										14
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								README.md
									
									
									
									
									
								
							@@ -1,28 +1,26 @@
 | 
				
			|||||||
Docker: [](https://microbadger.com/images/thomasnordquist/photon-geocoder "Get your own image badge on microbadger.com") [](https://hub.docker.com/r/thomasnordquist/photon-geocoder/) [](https://microbadger.com/images/thomasnordquist/photon-geocoder "Get your own version badge on microbadger.com")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Github:
 | 
					 | 
				
			||||||
[](https://github.com/thomasnordquist/photon-docker/issues) [](https://github.com/thomasnordquist/photon-docker/stargazers) [](https://github.com/thomasnordquist/photon-docker/network)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Have your own geocoder up and running within the hour, you will require about 60GB of disk space and has no further dependencies.
 | 
					Have your own geocoder up and running within the hour, you will require about 60GB of disk space and has no further dependencies.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Feel free to fork and improve.
 | 
					Feel free to fork and improve.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					See this [blog post]() for mor info
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Run
 | 
					# Run
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The image itself is pretty small, the first time the container is executed, a 30GB searchindex will be downloaded.
 | 
					The image itself is pretty small, the first time the container is executed, a 60GB searchindex will be downloaded. The [blog post]() explains how to use only a specific country or region.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The data volume is exposed as `/photon/photon_data` and can be mounted, this way you'll only have to download the data once.
 | 
					The data volume is exposed as `/photon/photon_data` and can be mounted, this way you'll only have to download the data once.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## With `docker run`
 | 
					## With `docker run`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```bash
 | 
					```bash
 | 
				
			||||||
docker run -p 2322:2322 -it thomasnordquist/photon-geocoder:latest
 | 
					docker run -p 2322:2322 -it tonsnoei/photon-geocoder:latest
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Search
 | 
					## Search
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
http://localhost:2322/api?q=berlin
 | 
					http://localhost:2322/api?q=amsterdam
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
*For more details on the API check the photon [github repository](https://github.com/komoot/photon).*
 | 
					*For more details on the API check the photon [github repository](https://github.com/komoot/photon).*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ services:
 | 
				
			|||||||
    build:
 | 
					    build:
 | 
				
			||||||
      context: .
 | 
					      context: .
 | 
				
			||||||
      dockerfile: Dockerfile
 | 
					      dockerfile: Dockerfile
 | 
				
			||||||
    image: thomasnordquist/photon-geocoder:latest
 | 
					    image: tonsnoei/photon-geocoder:latest
 | 
				
			||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - data:/photon/photon_data
 | 
					      - data:/photon/photon_data
 | 
				
			||||||
    ports:
 | 
					    ports:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,7 +7,10 @@ if [ ! -d "/photon/photon_data/elasticsearch" ]; then
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    # Let graphhopper know where the traffic is coming from
 | 
					    # Let graphhopper know where the traffic is coming from
 | 
				
			||||||
    USER_AGENT="docker: thomasnordquist/photon-geocoder"
 | 
					    USER_AGENT="docker: thomasnordquist/photon-geocoder"
 | 
				
			||||||
    wget --user-agent="$USER_AGENT" -O - http://download1.graphhopper.com/public/photon-db-latest.tar.bz2 | bzip2 -cd | tar x
 | 
					    # If you want to install a specific region only, enable the line below and disable the current 'wget' row.
 | 
				
			||||||
 | 
					    # Take a look at http://download1.graphhopper.com/public/extracts/by-country-code for your country
 | 
				
			||||||
 | 
					    wget --user-agent="$USER_AGENT" -O - http://download1.graphhopper.com/public/extracts/by-country-code/nl/photon-db-nl-latest.tar.bz2 | bzip2 -cd | tar x
 | 
				
			||||||
 | 
					    # wget --user-agent="$USER_AGENT" -O - http://download1.graphhopper.com/public/photon-db-latest.tar.bz2 | bzip2 -cd | tar x
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Start photon if elastic index exists
 | 
					# Start photon if elastic index exists
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user