mirror of https://github.com/immich-app/immich.git
feat(web, server): Ability to use config file instead of admin UI (#3836)
* implement method to read config file * getConfig returns config file if present * return isConfigFile for http requests * disable elements if config file is used, show message if config file is set, copy existing config to clipboard * fix allowing partial configuration files * add new env variable to docs * fix tests * minor refactoring, address review * adapt config type in frontend * remove unnecessary imports * move config file reading to system-config repo * add documentation * fix code formatting in system settings page * add validator for config file * fix formatting in docs * update generated files * throw error when trying to update config. e.g. via cli or api * switch to feature flags for isConfigFile * refactoring * refactor: config file * chore: open api * feat: always show copy/export buttons * fix: default flags * refactor: copy to clipboard --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>pull/3813/head
parent
20e0c03b39
commit
59bb727636
@ -0,0 +1,91 @@
|
|||||||
|
# Config File
|
||||||
|
|
||||||
|
A config file can be provided as an alternative to the UI configuration.
|
||||||
|
|
||||||
|
### Step 1 - Create a new config file
|
||||||
|
|
||||||
|
In JSON format, create a new config file (e.g. `immich.config`) and put it in a location that can be accessed by Immich.
|
||||||
|
The default configuration looks like this:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"ffmpeg": {
|
||||||
|
"crf": 23,
|
||||||
|
"threads": 0,
|
||||||
|
"preset": "ultrafast",
|
||||||
|
"targetVideoCodec": "h264",
|
||||||
|
"targetAudioCodec": "aac",
|
||||||
|
"targetResolution": "720",
|
||||||
|
"maxBitrate": "0",
|
||||||
|
"twoPass": false,
|
||||||
|
"transcode": "required",
|
||||||
|
"tonemap": "hable",
|
||||||
|
"accel": "disabled"
|
||||||
|
},
|
||||||
|
"job": {
|
||||||
|
"backgroundTask": {
|
||||||
|
"concurrency": 5
|
||||||
|
},
|
||||||
|
"clipEncoding": {
|
||||||
|
"concurrency": 2
|
||||||
|
},
|
||||||
|
"metadataExtraction": {
|
||||||
|
"concurrency": 5
|
||||||
|
},
|
||||||
|
"objectTagging": {
|
||||||
|
"concurrency": 2
|
||||||
|
},
|
||||||
|
"recognizeFaces": {
|
||||||
|
"concurrency": 2
|
||||||
|
},
|
||||||
|
"search": {
|
||||||
|
"concurrency": 5
|
||||||
|
},
|
||||||
|
"sidecar": {
|
||||||
|
"concurrency": 5
|
||||||
|
},
|
||||||
|
"storageTemplateMigration": {
|
||||||
|
"concurrency": 5
|
||||||
|
},
|
||||||
|
"thumbnailGeneration": {
|
||||||
|
"concurrency": 5
|
||||||
|
},
|
||||||
|
"videoConversion": {
|
||||||
|
"concurrency": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth": {
|
||||||
|
"enabled": false,
|
||||||
|
"issuerUrl": "",
|
||||||
|
"clientId": "",
|
||||||
|
"clientSecret": "",
|
||||||
|
"mobileOverrideEnabled": false,
|
||||||
|
"mobileRedirectUri": "",
|
||||||
|
"scope": "openid email profile",
|
||||||
|
"storageLabelClaim": "preferred_username",
|
||||||
|
"buttonText": "Login with OAuth",
|
||||||
|
"autoRegister": true,
|
||||||
|
"autoLaunch": false
|
||||||
|
},
|
||||||
|
"passwordLogin": {
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
"storageTemplate": {
|
||||||
|
"template": "{{y}}/{{y}}-{{MM}}-{{dd}}/{{filename}}"
|
||||||
|
},
|
||||||
|
"thumbnail": {
|
||||||
|
"webpSize": 250,
|
||||||
|
"jpegSize": 1440
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
:::tip
|
||||||
|
In Administration > Settings is a button to copy the current configuration to your clipboard.
|
||||||
|
So you can just grab it from there, paste it into a file and you're pretty much good to go.
|
||||||
|
:::
|
||||||
|
|
||||||
|
### Step 2 - Specify the file location
|
||||||
|
|
||||||
|
In your `.env` file, set the variable `IMMICH_CONFIG_FILE` to the path of your config.
|
||||||
|
For more information, refer to the [Environment Variables](https://docs.immich.app/docs/install/environment-variables) section.
|
||||||
Loading…
Reference in New Issue