Skip to content
This repository has been archived by the owner on Apr 27, 2024. It is now read-only.

Change order of deploy script #42

Closed
fmaclen opened this issue Mar 8, 2023 · 0 comments · Fixed by #45
Closed

Change order of deploy script #42

fmaclen opened this issue Mar 8, 2023 · 0 comments · Fixed by #45
Labels
bug Something isn't working

Comments

@fmaclen
Copy link
Owner

fmaclen commented Mar 8, 2023

Getting this error occasionally:

-> Downloading Pocketbase for linux (x64)
-> Unzipping Pocketbase
node:fs:599
  handleErrorFromBinding(ctx);
  ^

Error: ETXTBSY: text file is busy, open '/home/promptspree/pocketbase/pocketbase'
    at Object.openSync (node:fs:599:3)
    at Utils.writeFileTo (/home/promptspree/node_modules/adm-zip/util/utils.js:81:22)
    at /home/promptspree/node_modules/adm-zip/adm-zip.js:617:27
    at Array.forEach (<anonymous>)
    at Object.extractAllTo (/home/promptspree/node_modules/adm-zip/adm-zip.js:605:26)
    at downloadAndUnzipPocketbase (file:///home/promptspree/scripts/pocketbaseSetup.js:37:6)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  errno: -26,
  syscall: 'open',
  code: 'ETXTBSY',
  path: '/home/promptspree/pocketbase/pocketbase'
}

My best guess is it's because the binary is in use or something like that so to be safe, let's kill the process first, setup, then serve.

The front-end build process is much slower than restarting Pocketbase so we do the build part first.

# git pull
# front-end command

...

# Restart backend
pkill -f "./pocketbase serve APP_NAME=promptspree-backend"

# Install Pocketbase
npm run setup:pocketbase

# Serve Pocketbase
nohup bash -c "cd pocketbase/ && ./pocketbase serve APP_NAME=promptspree-backend" &
@fmaclen fmaclen added the bug Something isn't working label Mar 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant