Secret files
Mount files such as certificates, key files and config files into a service.
A secret file is a file you upload once and Helipod mounts into the service at a path you choose, for example a service account JSON at /app/credentials.json. Use it for things that don't fit in a variable. Changes take effect on the next deploy.
Contents are write-only
The API lists a file's name and mount path, never its contents. You can replace a file, but you can't download it back.
The file object
{ "id": "4e5f6a7b-8c9d-4e0f-a1b2-c3d4e5f6a7b8", "name": "Firebase credentials", "mountPath": "/app/credentials.json", "fileName": "credentials.json" }Prop
Type
List
/containers/services/{serviceId}/filesUpload
/containers/services/{serviceId}/filesmountPath. Returns 201.Prop
Type
curl -X POST https://api.helipod.io/api/containers/services/$SERVICE/files \
-H "Authorization: Bearer hel_your_key" -H "Content-Type: application/json" \
-d "{
\"name\": \"Firebase credentials\",
\"fileName\": \"credentials.json\",
\"mountPath\": \"/app/credentials.json\",
\"contentBase64\": \"$(base64 < credentials.json | tr -d '\n')\"
}"The response is { "file": { ... }, "needsRedeploy": true }.
Files are checked before they are stored:
- Up to 10 MB, and not empty (
400 INVALID_FILEwhen the base64 is invalid, the file is empty or too large). - No programs or scripts: executables and files such as
.sh,.py,.jsor.exeare refused (400 REQUEST_ERROR,errorsays why). - At most 10 uploads a minute.
Replace or move
/containers/services/{serviceId}/files/{fileId}Takes the same fields as upload, all optional: contentBase64 (with an optional new fileName), mountPath and name. Send at least one (400 NOTHING_TO_UPDATE otherwise). The response is { "file": { ... }, "needsRedeploy": true }.
Delete
/containers/services/{serviceId}/files/{fileId}Returns { "id": "...", "deleted": true, "needsRedeploy": true }, or 404 FILE_NOT_FOUND.