I recently had a similar need to push/pull files to a Fly volume for a PHP-based CMS. What I did is added wormhole-william (a single binary Go-based version of magic-wormhole) to my Dockerfile setup:
FROM php:8.0-apache
# Assorted setup…
# Install Go-based magic-wormhole for downloading volume content for local development.
RUN curl -fsSL -o /usr/local/bin/wormhole https://github.com/psanford/wormhole-william/releases/download/v1.0.6/wormhole-william-linux-amd64 && chmod +x /usr/local/bin/wormhole
# Other setup…
Then, with wormhole-william/magic-wormhole installed on my local computer, I can push a file or folder like so:
# In terminal tab A
wormhole send path/to/file
# In terminal tab B
flyctl ssh console
cd /path/to/dest
wormhole receive <code-from-tab-a>
Or I can pull a file or folder like so:
# In terminal tab A
fly ssh console -C "wormhole send /data/path/to/file"
# In terminal tab B
cd /path/to/dest
wormhole receive <code-from-tab-a>
The nice thing about this approach is it transfers directly between devices without an intermediary like Dropbox. Plus, you can use wormhole-william’s Go-based API to write a little script to automate these steps if you’re doing it often.