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": {
|
||||
"immich": "bin/cli.sh",
|
||||
"immich-admin": "bin/admin-cli.sh"
|
||||
"immich-admin": "start.sh admin-cli"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "^9.1.8",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"license": "UNLICENSED",
|
||||
"bin": {
|
||||
"immich": "./bin/cli.sh",
|
||||
"immich-admin": "./bin/admin-cli.sh"
|
||||
"immich-admin": "./start.sh admin-cli"
|
||||
},
|
||||
"scripts": {
|
||||
"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 microservices } from './microservices/main';
|
||||
|
||||
|
@ -14,8 +14,8 @@ function bootstrap() {
|
|||
return immich();
|
||||
case 'microservices':
|
||||
return microservices();
|
||||
case 'cli':
|
||||
return cli();
|
||||
case 'admin-cli':
|
||||
return adminCli();
|
||||
default:
|
||||
console.log(`Invalid app name: ${immichApp}. Expected one of immich|microservices|cli`);
|
||||
process.exit(1);
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$DB_URL_FILE" ]; then
|
||||
export DB_URL=$(cat $DB_URL_FILE)
|
||||
unset DB_URL_FILE
|
||||
fi
|
||||
|
||||
if [ "$DB_HOSTNAME_FILE" ]; then
|
||||
export DB_HOSTNAME=$(cat $DB_HOSTNAME_FILE)
|
||||
unset DB_HOSTNAME_FILE
|
||||
|
|
Loading…
Reference in a new issue