#115 Allow inline configuration as an option
This commit is contained in:
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "immich-public-proxy",
|
||||
"version": "1.12.0",
|
||||
"version": "1.12.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "immich-public-proxy",
|
||||
"version": "1.12.0",
|
||||
"version": "1.12.1",
|
||||
"license": "AGPL-3.0",
|
||||
"dependencies": {
|
||||
"archiver": "^7.0.1",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "immich-public-proxy",
|
||||
"version": "1.12.0",
|
||||
"version": "1.12.1",
|
||||
"scripts": {
|
||||
"dev": "ts-node src/index.ts",
|
||||
"build": "npx tsc",
|
||||
|
||||
@@ -4,8 +4,13 @@ import { DownloadAll, SharedLink } from './types'
|
||||
|
||||
let config = {}
|
||||
try {
|
||||
const configJson = require(process.env.IPP_CONFIG || '../config.json')
|
||||
if (typeof configJson === 'object') config = configJson
|
||||
if (process.env.CONFIG) {
|
||||
// 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) {
|
||||
console.log(e)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user