All apps · 0 apps
PhotoPrism-Helper
Docker app from Aerilym's Repository
Overview
Readme
View on GitHubPhotoPrism Helper
PhotoPrism Helper is an unofficial companion tool created for use alongside PhotoPrism. This project isn't associated with the PhotoPrism project, it's just a companion tool created to extend the functionality of PhotoPrism.
Feature Overview
- Middleware API
- Web Interface
- Automation of PhotoPrism features
The current main features are API endpoints for importing and indexing content, as well as setting up cron tasks to enable automated importing and indexing.
Getting Started
The application is designed to be used in a docker container or hosted on any local machine. After cloning the repository you can set up, build, and run the project by doing the following:
Start by installing all the dependencies:
npm install
npm run build
or
docker build -t aerilym/photoprism-helper .
Environment Variables
A list of possible environment variables is available: .env.template
| Variable | Default | Description |
|---|---|---|
| PHOTOPRISM_SITE_URL | http://localhost:2342/ |
The URL of your PhotoPrism instance. |
| HOSTPORT | 2343 |
The port the helper is hosted on. |
| PHOTOPRISM_USERNAME | admin |
The PhotoPrism username you want the helper to use for access. |
| PHOTOPRISM_PASSWORD | |
The PhotoPrism password associated with the username. |
| APIKEY | testkey |
The API key you'll use to query the helper API. |
| TIMEZONE | Melbourne/Australia |
The timezone of your instance. |
| IMPORT_TIMEOUT | 300000 |
The number of milliseconds the import function should wait for a success message before timing out. |
| MOVE_ON_IMPORT | false |
Enable/Disable moving files on import. |
| AUTO_IMPORT | false |
Enable/Disable the auto-import feature. |
| AUTO_IMPORT_CRON | 0 0 4 * * * * |
The cron expression for when to run auto-import. |
| INDEX_AFTER_AUTO_IMPORT | false |
Enable/Disable the index after auto-importing feature. |
| INDEX_TIMEOUT | 300000 |
The number of milliseconds the index function should wait for a success message before timing out. |
| INDEX_RESCAN | false |
Enable/Disable rescanining when indexing (From PhotoPrism settings). |
| INDEX_SKIP_ARCHIVED | false |
Enable/Disable skipping archive (From PhotoPrism settings). |
| AUTO_INDEX | false |
Enable/Disable the auto-index feature. |
| AUTO_INDEX_CRON | 0 0 6 * * * * |
The cron expression for when to run auto-index. |
| LOGFILE_PATH | logs/local.log |
The logging file path. |
| LOGLEVEL_CONSOLE | info |
The log level to apply to the console log. |
| LOGLEVEL_FILE | error |
The log level to apply to the file log. |
| SEND_ERRORS | true |
Enable/Disable sending errors/exceptions to the dev. |
| ERROR_LOG_URL | |
The URL to send errors to. (Don't change unless you're running your own fork of the helper) |
| ERROR_LOG_KEY | |
The API key sent with error logs to the external server. |
| ERROR_LOG_ANONYMISE | false |
Enable/Disable anonymising externally sent error logs. |
| ERROR_LOG_OPTIONS | true |
Enable/Disable sending your configuration options with externally sent errors. |
| EXTERNAL_LOG | false |
Enable/Disable sending logs to an external log server. |
| EXTERNAL_LOG_DEPTH | info |
The log level to apply to the external log. |
| EXTERNAL_LOG_URL | |
The URL of the external log server. |
| EXTERNAL_LOG_KEY | |
The API key sent with logs sent to the external log server. |
| EXTERNAL_LOG_ANONYMISE | false |
Enable/Disable anonymising externally sent logs. |
| EXTERNAL_LOG_OPTIONS | true |
Enable/Disable sending your configuration options with externally sent logs. |
If enabled, the configuration options sent with externally sent errors and logs are:
TBD
Building a Local Install
Create a .env file, based on the .env.template file and fill it with your options.
At a minimum, the USER AND PASS environment variables need to be set, but BASEURL will be required if your PhotoPrism instance isn't available on localhost:2342. Read more about environment variables.
Run the following command to build the application from the source files:
npm run build
This will build the application and output the files to build/
Once the application is built, run the following command to start it:
npm run start:prd
The application will now run and be available at the address and port you specified in .env
If you're familiar with Node and TypeScript feel free to isolate the build folder to minimise the installation.
Docker
The container can be created using the Dockerfile available, or by using the container available as a GitHub Package or DockerHub.
The container can be easily built from the source code by running:
npm run build:docker
API Documentation
Authentication
All requests must contain an authorization header with a set API key as such:
Authorization: "Bearer <APIKEY>"
Endpoints
Import
POST /import
Index
POST /index
Stats
GET /stats
Install PhotoPrism-Helper on Unraid in a few clicks.
Find PhotoPrism-Helper in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.
Download Statistics
Related apps
Explore more like this
Explore allDetails
aerilym/photoprism-helper:masterRuntime arguments
- Network
bridge- Shell
sh- Privileged
- false
Template configuration
The port the helper is hosted on. Container Port: 2343
- Target
- 2343
- Default
- 2342
- Value
- 2343
Container Variable: PHOTOPRISM_SITE_URL
- Target
- PHOTOPRISM_SITE_URL
- Default
- http://localhost:2342
- Value
- http://localhost:2342
The PhotoPrism username you want the helper to use for access.
- Target
- PHOTOPRISM_USERNAME
- Default
- admin
- Value
- admin
The PhotoPrism password associated with the username.
- Target
- PHOTOPRISM_PASSWORD
The API key you'll use to query the helper API.
- Target
- APIKEY
- Default
- testkey
- Value
- testkey
The timezone of your instance.
- Target
- TIMEZONE
- Default
- Australia/Melbourne
- Value
- Australia/Melbourne
The number of milliseconds the import function should wait for a success message before timing out.
- Target
- IMPORT_TIMEOUT
- Default
- 300000
- Value
- 300000
Enable/Disable the auto-import feature.
- Target
- AUTO_IMPORT
- Default
- false
- Value
- false
The cron expression for when to run auto-import.
- Target
- AUTO_IMPORT_CRON
- Default
- 0 0 4 * * * *
- Value
- 0 0 5 * * * *
Enable/Disable the index after auto-importing feature.
- Target
- INDEX_AFTER_AUTO_IMPORT
- Default
- false
- Value
- false
Enable/Disable the auto-index feature.
- Target
- AUTO_INDEX
- Default
- false
- Value
- false
The cron expression for when to run auto-index.
- Target
- AUTO_INDEX_CRON
- Default
- 0 0 6 * * * *
- Value
- 0 0 5 * * * *
Tells the helper instance if it is running in a Docker container. Container Variable: ISDOCKER
- Default
- 1
- Value
- 1
The logging file path.
- Target
- LOGFILE_PATH
- Default
- logs/local.log
- Value
- logs/local.log
The log level to apply to the console log.
- Target
- LOGLEVEL_CONSOLE
- Default
- info
- Value
- info
The log level to apply to the file log.
- Target
- LOGLEVEL_FILE
- Default
- error
- Value
- error
Enable/Disable sending errors/exceptions to the dev.
- Target
- SEND_ERRORS
- Default
- true
- Value
- true
The URL to send errors to. (Don't change unless you're running your own fork of the helper)
- Target
- ERROR_LOG_URL
The API key sent with error logs to the external server.
- Target
- ERROR_LOG_KEY
Enable/Disable anonymising externally sent error logs.
- Target
- ERROR_LOG_IDENTITY_ANONYMISED
- Default
- false
- Value
- false
Enable/Disable sending your configuration options with externally sent errors.
- Target
- ERROR_LOG_IDENTITY_SEND_OPTIONS
- Default
- true
- Value
- true
Enable/Disable sending logs to an external log server.
- Target
- EXTERNAL_LOG
- Default
- false
- Value
- false
The log level to apply to the external log.
- Target
- EXTERNAL_LOG_DEPTH
- Default
- info
- Value
- info
The URL of the external log server.
- Target
- EXTERNAL_LOG_URL
The API key sent with logs sent to the external log server.
- Target
- EXTERNAL_LOG_KEY
Enable/Disable anonymising externally sent logs.
- Target
- EXTERNAL_LOG_IDENTITY_ANONYMISED
- Default
- false
- Value
- false
Enable/Disable sending your configuration options with externally sent logs.
- Target
- EXTERNAL_LOG_IDENTITY_SEND_OPTIONS
- Default
- true
- Value
- true