1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-22 01:47:08 +02:00

chore(server): faster shutdown (#5577)

* chore(server): faster shutdown

* fix: e2e test entrypoint
This commit is contained in:
Jason Rasmussen 2023-12-08 21:58:07 -05:00 committed by GitHub
parent 92b4284b5a
commit 6acd8eb4ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 3 deletions

View File

@ -29,7 +29,7 @@ x-server-build: &server-common
services: services:
immich-server: immich-server:
container_name: immich_server container_name: immich_server
command: npm run start:debug immich command: [ "/usr/src/app/bin/immich-dev", "immich" ]
<<: *server-common <<: *server-common
ports: ports:
- 3001:3001 - 3001:3001
@ -40,7 +40,7 @@ services:
immich-microservices: immich-microservices:
container_name: immich_microservices container_name: immich_microservices
command: npm run start:debug microservices command: [ "/usr/src/app/bin/immich-dev", "microservices" ]
<<: *server-common <<: *server-common
# extends: # extends:
# file: hwaccel.yml # file: hwaccel.yml

View File

@ -9,7 +9,8 @@ services:
context: ../ context: ../
dockerfile: server/Dockerfile dockerfile: server/Dockerfile
target: dev target: dev
command: npm run test:e2e entrypoint: [ "/usr/local/bin/npm", "run" ]
command: test:e2e
volumes: volumes:
- ../server:/usr/src/app - ../server:/usr/src/app
- /usr/src/app/node_modules - /usr/src/app/node_modules

View File

@ -1,6 +1,7 @@
# dev build # dev build
FROM ghcr.io/immich-app/base-server-dev:20231207@sha256:175d55f2fff48e0edeaf359c1aa0572b923db0c19304c22136a39061b8bc8179 as dev FROM ghcr.io/immich-app/base-server-dev:20231207@sha256:175d55f2fff48e0edeaf359c1aa0572b923db0c19304c22136a39061b8bc8179 as dev
RUN apt-get install --no-install-recommends -yqq tini
WORKDIR /usr/src/app WORKDIR /usr/src/app
COPY server/package.json server/package-lock.json ./ COPY server/package.json server/package-lock.json ./
RUN npm ci && \ RUN npm ci && \
@ -9,6 +10,7 @@ RUN npm ci && \
rm -rf node_modules/@img/sharp-libvips* && \ rm -rf node_modules/@img/sharp-libvips* && \
rm -rf node_modules/@img/sharp-linuxmusl-x64 rm -rf node_modules/@img/sharp-linuxmusl-x64
COPY server . COPY server .
ENTRYPOINT ["tini", "--", "/bin/sh"]
FROM dev AS prod FROM dev AS prod

2
server/bin/immich-dev Executable file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env bash
node /usr/src/app/node_modules/.bin/nest start --debug "0.0.0.0:9230" --watch -- "$@"