| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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.
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.
|
Consolidating into #8 — both fixes target the same Dockerfile and block the same deploy path, simpler to review as one. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
deploy/railway/start.sh has a #!/bin/bash shebang and uses bash-specific syntax — {1..30} brace expansion and wait -n — plus it calls curl to wait for PocketBase to become healthy. The node:20-alpine base image in deploy/docker/Dockerfile ships neither bash nor curl, so the container fails immediately at runtime with:
This is misleading — the file exists and is executable. The error is ENOENT on the shebang interpreter (/bin/bash), reported by the shell as the script itself being missing. Docker keeps restarting the container until you give up.
Fix
FROM node:20-alpine +RUN apk add --no-cache bash curl WORKDIR /appSwitching the shebang to #!/bin/sh is not an option because the script depends on bash features that BusyBox sh doesn't support.
Verified
Built and ran the image locally on linux/arm64. Container starts cleanly:
GET /tinykit returns HTTP 200.
Related
Stacks on top of #8 — both fixes are needed for any successful Docker deploy from deploy/docker/Dockerfile. They are independent bugs but the build is blocked by #8 first and runtime is blocked by this one second.
Test plan