Skip to content

Conversation

rtuszik
Copy link
Owner

@rtuszik rtuszik commented Jul 27, 2025

Versioning Change

The versioning for this Docker image has been decoupled from the upstream Photon version. This allows for more intuitive versioning that reflects changes to the container environment and scripts, rather than centering around changes to the underlying Photon application.

Breaking Changes

  • The data volume path has been changed from /photon/photon_data to /photon/data.

    docker-compose.yml update:

    volumes:
    -   - photon_data:/photon/photon_data
    +   - photon_data:/photon/data
  • COUNTRY_CODE replaced with REGION system

    Old: COUNTRY_CODE=de
    New: REGION=andorra or REGION=europe

  • Default base URL changed to https://r2.koalasec.org/public (was /public/experimental)

  • Index file naming changed to include OpenSearch version (e.g., photon-db-planet-0.7OS-latest.tar.bz2)

New Features

  • Non-Root User: The container now runs processes as a dedicated non-root user (photon) for improved security. The user and group IDs can be set via PUID and PGID environment variables to manage volume permissions.
  • Notifications: Support for status notifications (e.g., update completion, errors) has been added via Apprise. This can be configured with the APPRISE_URLS environment variable. feat: Add Apprise notifications for update status #100
  • Docker Healthcheck: A HEALTHCHECK instruction has been added to the Dockerfile. The container will show as unhealthy whenever the photon-api is not available.

Improvements

  • Process Management: All startup, update, and monitoring tasks are now managed by a Python application.
  • Atomic Updates: The index update mechanism now performs an atomic move.
  • Download Logic: The index downloader now supports resumable downloads and performs more thorough disk space checks. Closes Suggestion: make Downloads resumable #71
  • Build and Release Pipeline: The CI workflow for building and publishing Docker images has been updated to better handle pre-release (beta) and stable (latest) tags. A workflow for code quality checks using ruff, ty and vulture was added.

Copy link

socket-security bot commented Jul 27, 2025

sourcery-ai[bot]

This comment was marked as outdated.

Repository owner deleted a comment from sonarqubecloud bot Aug 5, 2025
@rtuszik rtuszik changed the title v2.0.0 v1.0.0 Aug 5, 2025
@rtuszik rtuszik self-assigned this Aug 5, 2025
@rtuszik rtuszik added this to the v2.0.0 milestone Aug 5, 2025
@rtuszik
Copy link
Owner Author

rtuszik commented Aug 5, 2025

Still needs work on the README.md to reflect changes.

rtuszik added 23 commits August 5, 2025 16:07
…p customization

feat(docker): create 'photon' user and group with specified PUID/PGID in Dockerfile
feat(docker): add gosu to Dockerfile for running commands as specific user
fix(permissions): update ownership and permissions logic to use 'photon' user/group
refactor(start-photon.sh): remove unused ES_UID and ES_GID variables
refactor(start-photon.sh): centralize user/group setup into `setup_user` function
refactor(start-photon.sh): use `gosu` to run photon as the 'photon' user
refactor(start-photon.sh): ensure data directory permissions are set before starting photon
Reorganize the "Configuration Options" section to appear after "Example
Docker Compose" for better flow.
Add `PUID` and `PGID` environment variables to the configuration options
table.
fix(Dockerfile): set correct permissions for photon.jar and /photon directory
refactor(start-photon.sh): remove redundant chmod 755 command
refactor(start-photon.sh): simplify md5sum verification
refactor(start-photon.sh): simplify tar extraction
refactor(start-photon.sh): simplify elasticsearch directory removal
refactor(start-photon.sh): simplify download logic
refactor(start-photon.sh): simplify md5 verification
refactor(start-photon.sh): simplify archive extraction
feat(start-photon.sh): add debug log for current owner
feat(start-photon.sh): add chown for temp directory
chore(config.sh): add chown command to ensure correct permissions for /photon directory
The photon service was previously started as the root user, which is not
a good security practice. This commit changes the service to run as the
'photon' user using `gosu`, improving security.
feat(Dockerfile): add python3.12 and uv to the image
refactor(Dockerfile): change entrypoint to use uv run main.py
rtuszik added 8 commits August 5, 2025 16:51
Now uses a marker file instead of checking the actual index file.
Extracted index directories will not have the same timestamp as the
remote download file.
Replaces `COUNTRY_CODE` with `REGION` for more flexible data selection, supporting planet, continent, and specific sub-region downloads.
@rtuszik rtuszik linked an issue Sep 7, 2025 that may be closed by this pull request
@rtuszik rtuszik merged commit 0d1edbc into main Sep 7, 2025
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant