title | group |
---|---|
Environment Variables |
Installation |
The Photoview server can be configured through several environment variables. This page presents an index of them all along with a description.
Environment variables related to configuration of the database.
Required | Variable | Default | Notes |
---|---|---|---|
PHOTOVIEW_DATABASE_DRIVER |
mysql |
Available options mysql (default), postgres and sqlite . Defines what database backend is used. One of the following MUST be set in addition to this variable. |
|
✓ | PHOTOVIEW_MYSQL_URL |
Required if the driver is mysql . The URL of the MySQL database to connect to. See formatting documentation. |
|
✓ | PHOTOVIEW_POSTGRES_URL |
Required if the driver is postgres . The connection string of the Postgres database to connect to. See formatting documentation. |
|
✓ | PHOTOVIEW_SQLITE_PATH |
Required if the driver is sqlite . Specifies the filepath for where the sqlite database should be saved. |
Required | Variable | Default | Notes |
---|---|---|---|
PHOTOVIEW_LISTEN_IP |
The IP for the server to listen on. In most cases can be set to localhost . |
||
PHOTOVIEW_LISTEN_PORT |
The port for the server to listen on | ||
✓ | PHOTOVIEW_SERVE_UI |
0 |
Set to 1 for the server to also serve the built static ui files. |
✓ | PHOTOVIEW_UI_PATH |
./ui |
Specify where the built UI files are located if PHOTOVIEW_SERVE_UI is enabled. |
PHOTOVIEW_PUBLIC_ENDPOINT |
Used if PHOTOVIEW_SERVE_UI is enabled.The URL from where the server can be accessed. For example if the server is available from the domain example.com, change this value to http://example.com/. If the server is encrypted with SSL, make sure to update the url protocol to https:// . |
||
✓ | PHOTOVIEW_API_ENDPOINT |
Used if PHOTOVIEW_SERVE_UI is disabled.The url from where the API can be accessed publicly. |
|
✓ | PHOTOVIEW_UI_ENDPOINT |
Used if PHOTOVIEW_SERVE_UI is disabled.The url from where the UI can be accessed publicly. |
Required | Variable | Default | Notes |
---|---|---|---|
✓ | PHOTOVIEW_MEDIA_CACHE |
./photo_cache |
Filepath for where to store generated media such as thumbnails and optimized videos. |
✓ | MAPBOX_TOKEN |
To enable map related features, you need to create a mapbox token. A token can be generated for free at https://account.mapbox.com/access-tokens/ It's a good idea to limit the scope of the token to your own domain, to prevent others from using it. |