I am trying to update the settings (
fly.toml) for a rather bloated node app from a location with poor internet access. Deployment keeps failing after about 10-20 minutes.
Is there a way to update the settings without doing
Hmm. I know you can trigger a new release by changing the secrets, using the
fly secrets ... command (like to add a new one). That won’t need any files uploading. However therefore I’m not sure if it would apply any changes to
fly.toml. Could be worth a try.
The other option would be to use the remote builder using
fly deploy --remote-only to minimise the files that need uploading at all. Normally a node app should just be code files (and some static files, like images). You would exclude the enormous
node_modules folder, for example, using a
.dockerignore. And so unless you have a huge amount of code, that should reduce the amount of files that need moving to the bare minimum, with all the vm-stuff handled remotely (no need to upload a huge image). So there would be kb of data to upload, which even on a bad connection shouldn’t be long.
Oh, I’d forgotten about
Sadly tho it keeps failing…
Status: Downloaded newer image for heroku/pack:20
Error failed to fetch an image or build from source: executing lifecycle: io: read/write on closed pipe
secrets set a go - will take a while to see if the setting has been updated.
fly secrets set... didn’t update settings from
Ah. Well using
fly secrets was a long shot. I suspected it may not apply any non-secret changes. Worth a try.
Looks like getting the remote builds to work is your best bet to avoid having to upload a big image. I’m not sure why you get that pipe error.
What if you run
fly doctor from the app’s folder? Does that reveal any issues?
Remote builds would help here! How big is your source tree? It could be taking a while to upload your build context each time.
If you don’t have a
.dockerignore filr, try adding one to at least include
node_modules. You can use
du -sh -- * | sort -h to see what other large files may be lurking in there.
fly doctor looks good
I had a
dockerignore which contained
node_modules - however I’ve just spotted that
.git/ is 85M in size because someone had put lots of images in the source tree years ago and then removed them.
.dockerignore - I’m no longer in the location with poor internet access but hopefully next time
--remote-only will work better for me.