diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml index 9eb4cf97dc..f1208207c2 100644 --- a/docker/docker-compose.dev.yml +++ b/docker/docker-compose.dev.yml @@ -29,7 +29,7 @@ x-server-build: &server-common services: immich-server: container_name: immich_server - command: npm run start:debug immich + command: [ "/usr/src/app/bin/immich-dev", "immich" ] <<: *server-common ports: - 3001:3001 @@ -40,7 +40,7 @@ services: immich-microservices: container_name: immich_microservices - command: npm run start:debug microservices + command: [ "/usr/src/app/bin/immich-dev", "microservices" ] <<: *server-common # extends: # file: hwaccel.yml diff --git a/docker/docker-compose.test.yml b/docker/docker-compose.test.yml index 1f7df431a6..dbedce2c67 100644 --- a/docker/docker-compose.test.yml +++ b/docker/docker-compose.test.yml @@ -9,7 +9,8 @@ services: context: ../ dockerfile: server/Dockerfile target: dev - command: npm run test:e2e + entrypoint: [ "/usr/local/bin/npm", "run" ] + command: test:e2e volumes: - ../server:/usr/src/app - /usr/src/app/node_modules diff --git a/server/Dockerfile b/server/Dockerfile index 6b1bf1e509..cf1cce299c 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,6 +1,7 @@ # dev build 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 COPY server/package.json server/package-lock.json ./ RUN npm ci && \ @@ -9,6 +10,7 @@ RUN npm ci && \ rm -rf node_modules/@img/sharp-libvips* && \ rm -rf node_modules/@img/sharp-linuxmusl-x64 COPY server . +ENTRYPOINT ["tini", "--", "/bin/sh"] FROM dev AS prod diff --git a/server/bin/immich-dev b/server/bin/immich-dev new file mode 100755 index 0000000000..fcf064bf79 --- /dev/null +++ b/server/bin/immich-dev @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +node /usr/src/app/node_modules/.bin/nest start --debug "0.0.0.0:9230" --watch -- "$@"