fix(server): immich command (#5408)
* fix: immich command * chore: use absolute paths
This commit is contained in:
parent
5e55a17b2a
commit
6e365b37db
15 changed files with 11 additions and 18 deletions
|
@ -37,6 +37,7 @@ COPY server/start*.sh ./
|
|||
RUN npm link && npm cache clean --force
|
||||
COPY LICENSE /licenses/LICENSE.txt
|
||||
COPY LICENSE /LICENSE
|
||||
ENV PATH="${PATH}:/usr/src/app/bin"
|
||||
VOLUME /usr/src/app/upload
|
||||
EXPOSE 3001
|
||||
ENTRYPOINT ["tini", "--", "/bin/sh"]
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
./start.sh admin-cli $1
|
|
@ -1,2 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
npx immich "$@"
|
2
server/bin/immich
Executable file
2
server/bin/immich
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env bash
|
||||
node /usr/src/app/node_modules/.bin/immich "$@"
|
2
server/bin/immich-admin
Executable file
2
server/bin/immich-admin
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env sh
|
||||
/usr/src/app/start.sh immich-admin $1
|
4
server/package-lock.json
generated
4
server/package-lock.json
generated
|
@ -53,10 +53,6 @@
|
|||
"typesense": "^1.7.1",
|
||||
"ua-parser-js": "^1.0.35"
|
||||
},
|
||||
"bin": {
|
||||
"immich": "bin/cli.sh",
|
||||
"immich-admin": "bin/admin-cli.sh"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "^10.1.16",
|
||||
"@nestjs/schematics": "^10.0.2",
|
||||
|
|
|
@ -5,10 +5,6 @@
|
|||
"author": "",
|
||||
"private": true,
|
||||
"license": "UNLICENSED",
|
||||
"bin": {
|
||||
"immich": "./bin/cli.sh",
|
||||
"immich-admin": "./bin/admin-cli.sh"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "nest build",
|
||||
"format": "prettier --check .",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { bootstrap as adminCli } from './admin-cli/main';
|
||||
import { bootstrap as immich } from './immich/main';
|
||||
import { bootstrap as admin } from './immich-admin/main';
|
||||
import { bootstrap as server } from './immich/main';
|
||||
import { bootstrap as microservices } from './microservices/main';
|
||||
|
||||
const immichApp = process.argv[2] || process.env.IMMICH_APP;
|
||||
|
@ -12,13 +12,13 @@ function bootstrap() {
|
|||
switch (immichApp) {
|
||||
case 'immich':
|
||||
process.title = 'immich_server';
|
||||
return immich();
|
||||
return server();
|
||||
case 'microservices':
|
||||
process.title = 'immich_microservices';
|
||||
return microservices();
|
||||
case 'admin-cli':
|
||||
case 'immich-admin':
|
||||
process.title = 'immich_admin_cli';
|
||||
return adminCli();
|
||||
return admin();
|
||||
default:
|
||||
console.log(`Invalid app name: ${immichApp}. Expected one of immich|microservices|cli`);
|
||||
process.exit(1);
|
||||
|
|
|
@ -32,4 +32,4 @@ if [ "$REDIS_PASSWORD_FILE" ]; then
|
|||
unset REDIS_PASSWORD_FILE
|
||||
fi
|
||||
|
||||
exec node dist/main $@
|
||||
exec node /usr/src/app/dist/main $@
|
||||
|
|
Loading…
Reference in a new issue