1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-28 22:51:59 +00:00

fix: load env files for cli (#3503)

This commit is contained in:
Jason Rasmussen 2023-08-01 18:07:52 -04:00 committed by GitHub
parent 310fab526d
commit 2835919931
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 10 additions and 6 deletions

View file

@ -1 +0,0 @@
node ./dist/main cli "$@"

View file

@ -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",

View file

@ -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",

View file

@ -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);

View file

@ -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