From f8f339d8d129cc7a0ed123ab4798da11e0f4b9b1 Mon Sep 17 00:00:00 2001 From: Pedro Renan Date: Tue, 12 May 2026 19:41:42 +0100 Subject: [PATCH 1/2] fix(docker): copy scripts/ before npm ci so postinstall can run The Dockerfile copies only package*.json before running `npm ci`, but the postinstall hook executes `node scripts/download-pocketbase.js`. Since scripts/ has not been copied yet, npm ci fails with MODULE_NOT_FOUND and the build aborts. Copy scripts/ before npm ci so postinstall succeeds. The rest of the source is still copied afterward to preserve layer caching for the dependency install step. --- deploy/docker/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/deploy/docker/Dockerfile b/deploy/docker/Dockerfile index 9dd2f54..f08c443 100644 --- a/deploy/docker/Dockerfile +++ b/deploy/docker/Dockerfile @@ -4,6 +4,7 @@ WORKDIR /app # Install dependencies COPY package*.json ./ +COPY scripts ./scripts RUN npm ci --production=false # Copy app From c5a477c59499df076ba4ddf90cd59b111c7eb0bc Mon Sep 17 00:00:00 2001 From: Pedro Renan Date: Tue, 12 May 2026 19:51:48 +0100 Subject: [PATCH 2/2] fix(docker): install bash and curl on alpine for start.sh start.sh has a #!/bin/bash shebang and uses bash-specific syntax ({1..30} brace expansion and `wait -n`), plus calls curl to wait for PocketBase health. The node:20-alpine base image ships neither bash nor curl, so the container fails immediately at runtime with "./start.sh: not found" (ENOENT on the shebang interpreter). Install bash and curl via apk so start.sh runs as authored. --- deploy/docker/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deploy/docker/Dockerfile b/deploy/docker/Dockerfile index f08c443..a9e47ef 100644 --- a/deploy/docker/Dockerfile +++ b/deploy/docker/Dockerfile @@ -1,5 +1,7 @@ FROM node:20-alpine +RUN apk add --no-cache bash curl + WORKDIR /app # Install dependencies