how to set secrets from JSON file?

You can base64 it and set it as one big string (as long as it fits the undocumented, unknown size-limit for secrets), like so:

# on a *nix, from a loooong b64:
echo "long-base64-text..." | fly secrets set SECRET_BIG_B64=-

# and, from a file
fly secrets set SECRET_MASSIVE_TXT =- < file.txt

Ref: How are you managing cert files with Fly? - #16 by michael

2 Likes