diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml index 188b8c1234..02e436644f 100644 --- a/docker/docker-compose.dev.yml +++ b/docker/docker-compose.dev.yml @@ -57,7 +57,7 @@ services: image: immich-web-dev:latest build: context: ../web - command: "/usr/src/app/bin/immich-web" + command: [ "/usr/src/app/bin/immich-web" ] env_file: - .env ports: diff --git a/web/Dockerfile b/web/Dockerfile index 16ce7ac975..f6bdb20f98 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -1,5 +1,6 @@ FROM node:iron-alpine3.18 +RUN apk add --no-cache tini USER node WORKDIR /usr/src/app COPY --chown=node:node package*.json ./ @@ -8,3 +9,4 @@ COPY --chown=node:node . . ENV CHOKIDAR_USEPOLLING=true EXPOSE 24678 EXPOSE 3000 +ENTRYPOINT ["/sbin/tini", "--", "/bin/sh"] diff --git a/web/bin/immich-web b/web/bin/immich-web index 3d3b3dc46a..4d3b1e01a7 100755 --- a/web/bin/immich-web +++ b/web/bin/immich-web @@ -2,12 +2,7 @@ TYPESCRIPT_SDK=/usr/src/open-api/typescript-sdk -if [ ! -d "$TYPESCRIPT_SDK/build" ]; then - echo "$TYPESCRIPT_SDK/build does not exist, building" - npm --prefix "$TYPESCRIPT_SDK" install - npm --prefix "$TYPESCRIPT_SDK" run build -else - echo "$TYPESCRIPT_SDK/build exists, skipping" -fi +npm --prefix "$TYPESCRIPT_SDK" install +npm --prefix "$TYPESCRIPT_SDK" run build node ./node_modules/.bin/vite dev --host 0.0.0.0 --port 3000