Describe the bug
My country does not have a premade Photon database, so I wanted to import a jsonl data dump. I did so with this command:
zstd --stdout -d ../photon-dump-hungary-0.7-latest.jsonl.zst | sudo docker compose run --rm --no-TTY photon java $JAVA_OPTS -jar photon.jar -nominatim-import -import-file -
The import finished, but if I start the container normally with docker compose, the startup script ignores my setting to not update, deletes the database that I have imported manually, and then crashes because I did not give it internet access:
To Reproduce
- Use docker compose service definition included below
- Download JSON data dump: https://download1.graphhopper.com/public/europe/hungary/index.html
- Import JSON data dump with the command above
- Start up container:
sudo docker compose up photon
Expected behavior
I expected that using UPDATE_STRATEGY=DISABLED, the startup script will skip the download procedure and start up Photon, which would use the imported database.
photon-docker configuration:
networks:
default:
internal: true
services:
photon:
image: rtuszik/photon-docker:1.1.0
environment:
#- UPDATE_STRATEGY=PARALLEL
#- REGION=hu
- UPDATE_STRATEGY=DISABLED
volumes:
- photon-data:/photon/data
System Info
- Host OS: Debian
- Host Type: VM
- Hardware details:
- CPU: AMD Ryzen 3 1200
- Available RAM: 6 GB
- Storage Type: HDD
- Storage Size: 4 TB, but only 40 GB available.
Debug Logs
photon-1 | 2025-09-27 21:00:47,217 - root - INFO - Photon Manager starting...
photon-1 | 2025-09-27 21:00:47,217 - root - INFO - Running initial setup...
photon-1 | 2025-09-27 21:00:47,614 - root - INFO - No APPRISE_URLS set, skipping notification.
photon-1 | 2025-09-27 21:00:47,614 - root - INFO - === CONFIG VARIABLES ===
photon-1 | 2025-09-27 21:00:47,615 - root - INFO - UPDATE_STRATEGY: DISABLED
photon-1 | 2025-09-27 21:00:47,618 - root - INFO - UPDATE_INTERVAL: 30d
photon-1 | 2025-09-27 21:00:47,619 - root - INFO - REGION: None
photon-1 | 2025-09-27 21:00:47,619 - root - INFO - FORCE_UPDATE: False
photon-1 | 2025-09-27 21:00:47,620 - root - INFO - PHOTON_PARAMS: None
photon-1 | 2025-09-27 21:00:47,620 - root - INFO - JAVA_PARAMS: None
photon-1 | 2025-09-27 21:00:47,620 - root - INFO - LOG_LEVEL: INFO
photon-1 | 2025-09-27 21:00:47,621 - root - INFO - BASE_URL: https://r2.koalasec.org/public
photon-1 | 2025-09-27 21:00:47,621 - root - INFO - SKIP_MD5_CHECK: False
photon-1 | 2025-09-27 21:00:47,622 - root - INFO - === END CONFIG VARIABLES ===
photon-1 | 2025-09-27 21:00:47,622 - root - INFO - Validating environment variables...
photon-1 | 2025-09-27 21:00:47,622 - root - INFO - Environment variables are valid.
photon-1 | 2025-09-27 21:00:47,623 - root - INFO - Starting initial download using sequential strategy
photon-1 | 2025-09-27 21:00:47,623 - root - INFO - Note: Initial download will use sequential strategy regardless of config setting
photon-1 | 2025-09-27 21:00:47,624 - root - INFO - Starting sequential download process...
photon-1 | 2025-09-27 21:00:47,624 - root - INFO - Deleting old index...
photon-1 | 2025-09-27 21:00:47,737 - root - WARNING - Could not determine remote file size for https://r2.koalasec.org/public/photon-db-planet-0.7OS-latest.tar.bz2: HTTPSConnectionPool(host='r2.koalasec.org', port=443): Max retries exceeded with url: /public/photon-db-planet-0.7OS-latest.tar.bz2 (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f6b3e4709e0>: Failed to resolve 'r2.koalasec.org' ([Errno -3] Temporary failure in name resolution)"))
photon-1 | 2025-09-27 21:00:47,737 - root - WARNING - Could not determine download size, proceeding without space check
photon-1 | 2025-09-27 21:00:47,739 - root - INFO - Downloading new index and MD5 checksum...
photon-1 | 2025-09-27 21:00:47,745 - root - WARNING - Download attempt 1 failed: HTTPSConnectionPool(host='r2.koalasec.org', port=443): Max retries exceeded with url: /public/photon-db-planet-0.7OS-latest.tar.bz2 (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f6b3e4ae6c0>: Failed to resolve 'r2.koalasec.org' ([Errno -3] Temporary failure in name resolution)"))
photon-1 | 2025-09-27 21:00:47,747 - root - INFO - Retrying download (attempt 2/3)...
photon-1 | 2025-09-27 21:00:47,753 - root - WARNING - Download attempt 2 failed: HTTPSConnectionPool(host='r2.koalasec.org', port=443): Max retries exceeded with url: /public/photon-db-planet-0.7OS-latest.tar.bz2 (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f6b3e4aedb0>: Failed to resolve 'r2.koalasec.org' ([Errno -3] Temporary failure in name resolution)"))
photon-1 | 2025-09-27 21:00:47,755 - root - INFO - Retrying download (attempt 3/3)...
photon-1 | 2025-09-27 21:00:47,760 - root - WARNING - Download attempt 3 failed: HTTPSConnectionPool(host='r2.koalasec.org', port=443): Max retries exceeded with url: /public/photon-db-planet-0.7OS-latest.tar.bz2 (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f6b3e4af4a0>: Failed to resolve 'r2.koalasec.org' ([Errno -3] Temporary failure in name resolution)"))
photon-1 | 2025-09-27 21:00:47,761 - root - ERROR - Download failed after 3 attempts
Describe the bug
My country does not have a premade Photon database, so I wanted to import a jsonl data dump. I did so with this command:
The import finished, but if I start the container normally with docker compose, the startup script ignores my setting to not update, deletes the database that I have imported manually, and then crashes because I did not give it internet access:
To Reproduce
sudo docker compose up photonExpected behavior
I expected that using
UPDATE_STRATEGY=DISABLED, the startup script will skip the download procedure and start up Photon, which would use the imported database.photon-dockerconfiguration:System Info
Debug Logs