Fix seed script unreadable in image: COPY --chmod applied 0644 to the auto-created /app/scripts dir (unsearchable for the node user → MODULE_NOT_FOUND). Seed now lives at /app/pb-seed.mjs.
This commit is contained in:
+3
-3
@@ -25,9 +25,9 @@ PB_PID=$!
|
||||
# when records already exist or no superuser env is provided)
|
||||
(
|
||||
sleep 2
|
||||
if [ ! -f scripts/pb-seed.mjs ]; then
|
||||
echo "[entrypoint] WARNING: scripts/pb-seed.mjs missing from image — the image was built from a stale checkout; rebuild it"
|
||||
elif node scripts/pb-seed.mjs; then
|
||||
if [ ! -f pb-seed.mjs ]; then
|
||||
echo "[entrypoint] WARNING: pb-seed.mjs missing from image — the image was built from a stale checkout; rebuild it"
|
||||
elif node pb-seed.mjs; then
|
||||
echo "[entrypoint] pocketbase seed complete"
|
||||
else
|
||||
echo "[entrypoint] pocketbase seed skipped/failed — site falls back to bundled defaults"
|
||||
|
||||
Reference in New Issue
Block a user