{"id":18086790,"url":"https://github.com/rtuszik/photon-docker","last_synced_at":"2025-08-20T07:31:36.920Z","repository":{"id":255526206,"uuid":"852337154","full_name":"rtuszik/photon-docker","owner":"rtuszik","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-05T00:41:05.000Z","size":41,"stargazers_count":8,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-12T15:16:27.563Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rtuszik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-04T16:24:33.000Z","updated_at":"2024-12-12T10:38:48.000Z","dependencies_parsed_at":"2024-09-05T23:30:45.081Z","dependency_job_id":"d8d3379e-b55a-47d1-a898-1790af665f3e","html_url":"https://github.com/rtuszik/photon-docker","commit_stats":null,"previous_names":["rtuszik/photon-docker"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtuszik%2Fphoton-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtuszik%2Fphoton-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtuszik%2Fphoton-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtuszik%2Fphoton-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rtuszik","download_url":"https://codeload.github.com/rtuszik/photon-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230401761,"owners_count":18220022,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-31T16:58:30.216Z","updated_at":"2025-08-20T07:31:36.899Z","avatar_url":"https://github.com/rtuszik.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Docker Pulls](https://img.shields.io/docker/pulls/rtuszik/photon-docker) ![Docker Image Size](https://img.shields.io/docker/image-size/rtuszik/photon-docker) ![Docker Image Version](https://img.shields.io/docker/v/rtuszik/photon-docker) ![GitHub Release](https://img.shields.io/github/v/release/komoot/photon?label=Photon) ![Lint Status](https://github.com/rtuszik/photon-docker/actions/workflows/lint.yml/badge.svg)\n\n# Photon Docker Image\n\n## Overview\n\nThis is an _unofficial_ docker image for [Photon](https://github.com/komoot/photon)\n\nPhoton is an open-source geocoding solution built for OpenStreetMap (OSM) data,\nproviding features such as search-as-you-type and reverse geocoding.\nThis repository offers a Docker image for running Photon locally,\nenhancing data privacy and integration capabilities with services like [Dawarich](https://github.com/Freika/dawarich).\n\n## Important Notes\n\n⚠️ **Warning: Large File Sizes** ⚠️\n\n- The Photon index file is fairly large and growing steadily.\n  As of the beginning of 2025, around 200GB is needed for the full index,\n  and it is growing by 10-20GB per year.\n- Ensure you have sufficient disk space available before running the container.\n- The initial download and extraction process may take a considerable amount of time.\n  Depending on your hardware, checksum verification and decompression may take multiple hours.\n\n♻️ **Change in Default Download Source** ♻️\n\n- To reduce the load on the official Photon servers,\n  the default `BASE_URL` for downloading the index files now points to a community-hosted mirror.\n  Please see the **Community Mirrors** section for more details.\n\n## Usage\n\n### Configuration Options\n\nThe container can be configured using the following environment variables:\n\n| Variable          | Parameters                           | Default                                       | Description                                                                                                                                                                                                                                                                                                                                                          |\n| ----------------- | ------------------------------------ | --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `UPDATE_STRATEGY` | `PARALLEL`, `SEQUENTIAL`, `DISABLED` | `SEQUENTIAL`                                  | Controls how index updates are handled. `PARALLEL` downloads the new index in the background then swaps with minimal downtime (requires 2x space). `SEQUENTIAL` stops Photon, deletes the existing index, downloads the new one, then restarts. `DISABLED` prevents automatic updates. Most users do not need frequent updates; consider setting this to `DISABLED`. |\n| `UPDATE_INTERVAL` | Time string (e.g., \"720h\", \"30d\")    | `30d`                                         | How often to check for updates. To reduce server load, it is recommended to set this to a long interval (e.g., `720h` for 30 days) or disable updates altogether if you do not need the latest data.                                                                                                                                                                 |\n| `COUNTRY_CODE`    | Two-letter country code              | -                                             | Optional country code for a smaller index ([available codes](https://download1.graphhopper.com/public/extracts/by-country-code/)). Only one country code is supported at a time.                                                                                                                                                                                     |\n| `LOG_LEVEL`       | `DEBUG`, `INFO`, `ERROR`             | `INFO`                                        | Controls logging verbosity.                                                                                                                                                                                                                                                                                                                                          |\n| `FORCE_UPDATE`    | `TRUE`, `FALSE`                      | `FALSE`                                       | Forces an index update on container startup, regardless of `UPDATE_STRATEGY`.                                                                                                                                                                                                                                                                                        |\n| `BASE_URL`        | Valid URL                            | `https://r2.koalasec.org/public/experimental` | Custom base URL for index data downloads. Should point to the parent directory of index files. The default has been changed to a community mirror to reduce load on the GraphHopper servers.                                                                                                                                                                         |\n| `SKIP_MD5_CHECK`  | `TRUE`, `FALSE`                      | `FALSE`                                       | Optionally skip MD5 verification of downloaded index files.                                                                                                                                                                                                                                                                                                          |\n| `FILE_URL`        | URL to a .tar.bz2 file               | -                                             | Set a custom URL for the index file to be downloaded (e.g., \"https://download1.graphhopper.com/public/experimental/photon-db-latest.tar.bz2\"). This must be a tar.bz2 format. Make sure to set the `UPDATE_STRATEGY` to `DISABLED` when using this option.                                                                                                           |\n| `PHOTON_PARAMS`   | Photon executable parameters         | -                                             | See `https://github.com/komoot/photon#running-photon.`                                                                                                                                                                                                                                                                                                               |\n\n### Example Docker Compose\n\n```yaml\nservices:\n    photon:\n        image: rtuszik/photon-docker:latest\n        environment:\n            - UPDATE_STRATEGY=PARALLEL\n            - UPDATE_INTERVAL=720h # Check for updates every 30 days\n            # - COUNTRY_CODE=zw  # Optional: country-specific index\n        volumes:\n            - photon_data:/photon/photon_data\n        restart: unless-stopped\n        ports:\n            - \"2322:2322\"\nvolumes:\n    photon_data:\n```\n\n```bash\ndocker-compose up -d\n```\n\n## Community Mirrors\n\nTo ensure the sustainability of the Photon project and reduce the load on the official GraphHopper download servers,\nthis Docker image now defaults to using community-hosted mirrors.\n\n\u003e ⚠️ **Disclaimer:** Community mirrors are not officially managed by the Photon team or the maintainer of this Docker image.\n\u003e There are **no guarantees regarding the availability, performance, or integrity of the data** provided by these mirrors. Use them at your own discretion.\n\nIf you are hosting a public mirror, please open an issue or pull request to have it added to this list.\n\n| URL                                                     | Maintained By                                          | Status                                                                                                                                                                         |\n| ------------------------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `https://r2.koalasec.org/public/experimental`           | [rtuszik](https://github.com/rtuszik)                  | ![KoalaSec](https://img.shields.io/website?url=https%3A%2F%2Fr2.koalasec.org%2Fpublic%2Fexperimental%2Fphoton-db-latest.tar.bz2\u0026style=for-the-badge\u0026label=Status)              |\n| `https://download1.graphhopper.com/public/experimental` | [GraphHopper](https://www.graphhopper.com/) (Official) | ![GraphHopper](https://img.shields.io/website?url=https%3A%2F%2Fdownload1.graphhopper.com%2Fpublic%2Fexperimental%2Fphoton-db-latest.tar.bz2\u0026style=for-the-badge\u0026label=Status) |\n| `https://r2.naru.dev/` | [naru](https://github.com/narucx)                  | ![Status](https://img.shields.io/website?url=https%3A%2F%2Fr2.naru.dev%2Fphoton-db-latest.tar.bz2\u0026style=for-the-badge\u0026label=Status)\n\n### Use with Dawarich\n\nThis docker container for photon can be used as your reverse-geocoder for the [Dawarich Location History Tracker](https://github.com/Freika/dawarich)\n\nTo connect dawarich to your photon instance, the following environment variables need to be set in your dawarich docker-compose.yml:\n\n```yaml\nPHOTON_API_HOST={PHOTON-IP}:{PORT}\nPHOTON_API_USE_HTTPS=false\n```\n\nfor example:\n\n```yaml\nPHOTON_API_HOST=192.168.10.10:2322\nPHOTON_API_USE_HTTPS=false\n```\n\n- Do _not_ set `PHOTON_API_USE_HTTPS` to `true` unless your photon instance is available using HTTPS.\n- Only use the host address for your photon instance. Do not append `/api`\n\n### Build and Run Locally\n\n```bash\ndocker compose -f docker-compose.build.yml build --build-arg PHOTON_VERSION=0.6.2\n```\n\n### Accessing the API\n\nThe Photon API is available at:\n\n```\nhttp://localhost:2322/api?q=Harare\n```\n\n## Contributing\n\nContributions are welcome. Please submit pull requests or open issues for suggestions and improvements.\n\n## License\n\nThis project is licensed under the Apache License, Version 2.0.\n\n## Acknowledgments\n\n- [Photon](https://github.com/komoot/photon)\n- [Dawarich](https://github.com/Freika/dawarich)\n\n\u003c!-- end list --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtuszik%2Fphoton-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frtuszik%2Fphoton-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtuszik%2Fphoton-docker/lists"}