#115 Allow inline configuration as an option
This commit is contained in:
@@ -142,6 +142,21 @@ There are some additional configuration options you can change, for example the
|
|||||||
|
|
||||||
3. Restart your container and your custom configuration should be active.
|
3. Restart your container and your custom configuration should be active.
|
||||||
|
|
||||||
|
Alternatively, rather than a `config.json` file, you can pass the configuration inline from your `docker-compose.yml` file like this:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
environment:
|
||||||
|
PUBLIC_BASE_URL: https://your-proxy-url.com
|
||||||
|
IMMICH_URL: http://your-internal-immich-server:2283
|
||||||
|
CONFIG: |
|
||||||
|
{
|
||||||
|
"ipp": {
|
||||||
|
"singleImageGallery": false,
|
||||||
|
...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
### Immich Public Proxy options
|
### Immich Public Proxy options
|
||||||
|
|
||||||
| Option | Type | Description |
|
| Option | Type | Description |
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "immich-public-proxy",
|
"name": "immich-public-proxy",
|
||||||
"version": "1.12.0",
|
"version": "1.12.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "immich-public-proxy",
|
"name": "immich-public-proxy",
|
||||||
"version": "1.12.0",
|
"version": "1.12.1",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"archiver": "^7.0.1",
|
"archiver": "^7.0.1",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "immich-public-proxy",
|
"name": "immich-public-proxy",
|
||||||
"version": "1.12.0",
|
"version": "1.12.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "ts-node src/index.ts",
|
"dev": "ts-node src/index.ts",
|
||||||
"build": "npx tsc",
|
"build": "npx tsc",
|
||||||
|
|||||||
@@ -4,8 +4,13 @@ import { DownloadAll, SharedLink } from './types'
|
|||||||
|
|
||||||
let config = {}
|
let config = {}
|
||||||
try {
|
try {
|
||||||
const configJson = require(process.env.IPP_CONFIG || '../config.json')
|
if (process.env.CONFIG) {
|
||||||
if (typeof configJson === 'object') config = configJson
|
// Attempt to parse docker-compose config string into JSON (if specified)
|
||||||
|
config = JSON.parse(process.env.CONFIG)
|
||||||
|
} else {
|
||||||
|
const configJson = require(process.env.IPP_CONFIG || '../config.json')
|
||||||
|
if (typeof configJson === 'object') config = configJson
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -6,8 +6,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
environment:
|
environment:
|
||||||
- PUBLIC_BASE_URL=https://your-proxy-url.com
|
PUBLIC_BASE_URL: https://your-proxy-url.com
|
||||||
- IMMICH_URL=http://your-internal-immich-server:2283
|
IMMICH_URL: http://your-internal-immich-server:2283
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: curl -s http://localhost:3000/share/healthcheck -o /dev/null || exit 1
|
test: curl -s http://localhost:3000/share/healthcheck -o /dev/null || exit 1
|
||||||
start_period: 10s
|
start_period: 10s
|
||||||
|
|||||||
Reference in New Issue
Block a user