mirror of
https://github.com/immich-app/immich.git
synced 2025-01-03 13:09:27 +02:00
fix(server): immich command (#5408)
* fix: immich command * chore: use absolute paths
This commit is contained in:
parent
5e55a17b2a
commit
6e365b37db
@ -37,6 +37,7 @@ COPY server/start*.sh ./
|
|||||||
RUN npm link && npm cache clean --force
|
RUN npm link && npm cache clean --force
|
||||||
COPY LICENSE /licenses/LICENSE.txt
|
COPY LICENSE /licenses/LICENSE.txt
|
||||||
COPY LICENSE /LICENSE
|
COPY LICENSE /LICENSE
|
||||||
|
ENV PATH="${PATH}:/usr/src/app/bin"
|
||||||
VOLUME /usr/src/app/upload
|
VOLUME /usr/src/app/upload
|
||||||
EXPOSE 3001
|
EXPOSE 3001
|
||||||
ENTRYPOINT ["tini", "--", "/bin/sh"]
|
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",
|
"typesense": "^1.7.1",
|
||||||
"ua-parser-js": "^1.0.35"
|
"ua-parser-js": "^1.0.35"
|
||||||
},
|
},
|
||||||
"bin": {
|
|
||||||
"immich": "bin/cli.sh",
|
|
||||||
"immich-admin": "bin/admin-cli.sh"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nestjs/cli": "^10.1.16",
|
"@nestjs/cli": "^10.1.16",
|
||||||
"@nestjs/schematics": "^10.0.2",
|
"@nestjs/schematics": "^10.0.2",
|
||||||
|
@ -5,10 +5,6 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
"bin": {
|
|
||||||
"immich": "./bin/cli.sh",
|
|
||||||
"immich-admin": "./bin/admin-cli.sh"
|
|
||||||
},
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "nest build",
|
"build": "nest build",
|
||||||
"format": "prettier --check .",
|
"format": "prettier --check .",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { bootstrap as adminCli } from './admin-cli/main';
|
import { bootstrap as admin } from './immich-admin/main';
|
||||||
import { bootstrap as immich } from './immich/main';
|
import { bootstrap as server } from './immich/main';
|
||||||
import { bootstrap as microservices } from './microservices/main';
|
import { bootstrap as microservices } from './microservices/main';
|
||||||
|
|
||||||
const immichApp = process.argv[2] || process.env.IMMICH_APP;
|
const immichApp = process.argv[2] || process.env.IMMICH_APP;
|
||||||
@ -12,13 +12,13 @@ function bootstrap() {
|
|||||||
switch (immichApp) {
|
switch (immichApp) {
|
||||||
case 'immich':
|
case 'immich':
|
||||||
process.title = 'immich_server';
|
process.title = 'immich_server';
|
||||||
return immich();
|
return server();
|
||||||
case 'microservices':
|
case 'microservices':
|
||||||
process.title = 'immich_microservices';
|
process.title = 'immich_microservices';
|
||||||
return microservices();
|
return microservices();
|
||||||
case 'admin-cli':
|
case 'immich-admin':
|
||||||
process.title = 'immich_admin_cli';
|
process.title = 'immich_admin_cli';
|
||||||
return adminCli();
|
return admin();
|
||||||
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);
|
||||||
|
@ -32,4 +32,4 @@ if [ "$REDIS_PASSWORD_FILE" ]; then
|
|||||||
unset REDIS_PASSWORD_FILE
|
unset REDIS_PASSWORD_FILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec node dist/main $@
|
exec node /usr/src/app/dist/main $@
|
||||||
|
Loading…
Reference in New Issue
Block a user