mirror of
https://github.com/immich-app/immich.git
synced 2024-12-29 15:11:58 +00:00
fix: load env files for cli (#3503)
This commit is contained in:
parent
310fab526d
commit
2835919931
11 changed files with 10 additions and 6 deletions
|
@ -1 +0,0 @@
|
||||||
node ./dist/main cli "$@"
|
|
2
server/package-lock.json
generated
2
server/package-lock.json
generated
|
@ -54,7 +54,7 @@
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"immich": "bin/cli.sh",
|
"immich": "bin/cli.sh",
|
||||||
"immich-admin": "bin/admin-cli.sh"
|
"immich-admin": "start.sh admin-cli"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nestjs/cli": "^9.1.8",
|
"@nestjs/cli": "^9.1.8",
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
"bin": {
|
"bin": {
|
||||||
"immich": "./bin/cli.sh",
|
"immich": "./bin/cli.sh",
|
||||||
"immich-admin": "./bin/admin-cli.sh"
|
"immich-admin": "./start.sh admin-cli"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "nest build",
|
"build": "nest build",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { bootstrap as cli } from './cli/immich';
|
import { bootstrap as adminCli } from './admin-cli/main';
|
||||||
import { bootstrap as immich } from './immich/main';
|
import { bootstrap as immich } from './immich/main';
|
||||||
import { bootstrap as microservices } from './microservices/main';
|
import { bootstrap as microservices } from './microservices/main';
|
||||||
|
|
||||||
|
@ -14,8 +14,8 @@ function bootstrap() {
|
||||||
return immich();
|
return immich();
|
||||||
case 'microservices':
|
case 'microservices':
|
||||||
return microservices();
|
return microservices();
|
||||||
case 'cli':
|
case 'admin-cli':
|
||||||
return cli();
|
return adminCli();
|
||||||
default:
|
default:
|
||||||
console.log(`Invalid app name: ${immichApp}. Expected one of immich|microservices|cli`);
|
console.log(`Invalid app name: ${immichApp}. Expected one of immich|microservices|cli`);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ "$DB_URL_FILE" ]; then
|
||||||
|
export DB_URL=$(cat $DB_URL_FILE)
|
||||||
|
unset DB_URL_FILE
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$DB_HOSTNAME_FILE" ]; then
|
if [ "$DB_HOSTNAME_FILE" ]; then
|
||||||
export DB_HOSTNAME=$(cat $DB_HOSTNAME_FILE)
|
export DB_HOSTNAME=$(cat $DB_HOSTNAME_FILE)
|
||||||
unset DB_HOSTNAME_FILE
|
unset DB_HOSTNAME_FILE
|
||||||
|
|
Loading…
Reference in a new issue