Upload File to Deployment
This feature is currently only available through the API.
It is possible to upload files from your S3 bucket to your deployment. Since the files are only downloaded when a deployment is created, you can modify the files in your bucket and see the changes in the next deployment you create.
Pull profiles
Pull profiles define what files or folders should be downloaded from your S3 bucket and where to save them in your deployment.
Before creating a pull profile, ensure you have at least one Endpoint Storage configured.
You will then want to create a pull profile within this bucket with the following information:
The name of the pull profile: This will be used to associate the pull profile to your app versions later on, so it should be unique and descriptive.
The source path: The path to the file or folder in your S3 bucket. It should start with a slash, and its root is the root of your bucket.
The source_type: This can be either "file" or "folder" and must be set correctly for the download to succeed.
The destination path: The path in your deployment where the file or folder will be saved. It should start with a slash, and its root is the root of your container image.
Make sure to avoid protected destinations, such as /etc/
, as this will prevent the files from being copied to your deployment and will make your deployment fail. Make sure a normal user can write to the destination folder.
For example, if you wanted to copy the file some-file.txt
, from your bucket, to the custom-folder
folder in your deployment, with both file structures as described below:
You would create your pull profile with the following information:
For more details, see the API documentation.
Linking a pull profile to an app version
After creating a pull profile, you must link an app version to it, so the files are downloaded when a deployment is created. That way, you can use multiple pull profiles for a single app version and reuse pull profiles between app versions.
Limitations
The total size of the files downloaded to the deployment cannot exceed 5 MB.
If this limit is reached, you will be notified at deployment time so that you can promptly resolve the issue.
Last updated
Was this helpful?