forked from immich-app/immich
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(web, server): Ability to use config file instead of admin UI (im…
…mich-app#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 <[email protected]>
- Loading branch information
1 parent
20e0c03
commit 59bb727
Showing
33 changed files
with
359 additions
and
84 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.